From 1766a917e87e06094301250df3b689db766f724d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 22 Jun 2015 16:43:43 -0700 Subject: Executor sketch --- src/core/transport/chttp2/internal.h | 36 +++-- src/core/transport/chttp2_transport.c | 251 ++++++++++++++++++++++------------ 2 files changed, 193 insertions(+), 94 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 3d1cd56e61..784c85ec4f 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 0032ef1d4d..b32d9f0a71 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); } /* -- cgit v1.2.3 From 4b074d5274af7f1c2b2067181b398c9d09e4443c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 23 Jun 2015 07:48:21 -0700 Subject: CHTTP2 executor --- src/core/transport/chttp2/internal.h | 7 ++ src/core/transport/chttp2_transport.c | 167 ++++++++++++++++++---------------- 2 files changed, 94 insertions(+), 80 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 784c85ec4f..61947f7395 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 3cf08e1772..159072eab4 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, -- cgit v1.2.3 From 55e9953d949755e651a7320b854bead6dbcc2b64 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 23 Jun 2015 12:25:55 -0700 Subject: Fix some memory issues --- src/core/transport/chttp2_transport.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 159072eab4..0aae67a2c0 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)); } } -- cgit v1.2.3 From 0cd216cd160926d70f3566bf21f212e3c56a7e89 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 1 Jul 2015 16:11:25 -0700 Subject: Merge with latest --- src/core/transport/chttp2_transport.c | 37 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 09d1a8cb39..53c1898843 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) { -- cgit v1.2.3 From 253bd5016709f5a070ac792597ccf9f11cd29852 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Feb 2016 12:30:23 -0800 Subject: 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 (limited to 'src/core') diff --git a/src/core/iomgr/ev_poll_posix.c b/src/core/iomgr/ev_poll_posix.c new file mode 100644 index 0000000000..3693e13729 --- /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 0000000000..39dbc16442 --- /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 4229d8d2e4..127ab4b181 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 330d153415..971457ddcf 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 7b2bc53716..b6810e83a2 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 2f514bfc00..a3195277b6 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" ] }, -- cgit v1.2.3 From 7ac6bf07a90ce8921c3b24aa69644c9d581cfeea Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Feb 2016 12:54:59 -0800 Subject: 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 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 + 20 files changed, 209 insertions(+), 574 deletions(-) (limited to 'src/core') diff --git a/BUILD b/BUILD index 1898b4231b..e0fc55e5f7 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 2cbb34d85e..11b2bfbb4d 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 ee2b361f14..18df012257 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 e7afc03db4..d19bf67d52 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 ac2c2cb1ab..25d3cb0e9f 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 0f56518d6b..e3db166881 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 de41947c09..4f95d4cc9a 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 1741d0cf20..e6c18bf1e1 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 316cc34519..28287c6fa7 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 72a8f9f969..7de8c665e2 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 3693e13729..e2b0b08ac3 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 127ab4b181..d7681769c3 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 bfd216d3f3..9d1f64652d 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 46b748ef36..2629b82aff 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 863f8113af..544106eefc 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 e0c31db75e..0d3d97a829 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 8e0a5e8b94..fe77cea933 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 002379de62..0ecb2c636a 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 770eae403b..545aabb061 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 09167ab050..f6a69a307e 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 -- cgit v1.2.3 From b38197e0ccd1af098855f4a036ff55b58ceced38 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 26 Feb 2016 10:14:54 -0800 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/iomgr/ev_poll_and_epoll_posix.c b/src/core/iomgr/ev_poll_and_epoll_posix.c index 5ff02bb216..a1e0442a42 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 989461f2ae..8878aa61bc 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 baf3bd5db8..e56f415493 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 971457ddcf..330d153415 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 ba382d242a..7b6429572e 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 30a398e3fc..106f6bea39 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 dbc24462b6..629891a847 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" ] }, -- cgit v1.2.3 From e6dd0cb9f7233822fae6986b3e39d0ee6c825db9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 26 Feb 2016 14:39:35 -0800 Subject: Revert unnecessary change --- src/core/iomgr/ev_poll_and_epoll_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/iomgr/ev_poll_and_epoll_posix.c b/src/core/iomgr/ev_poll_and_epoll_posix.c index a1e0442a42..ead99b1497 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 = { -- cgit v1.2.3 From c31256537045f1ad45bda9b8bbbdfad7f64f4607 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 26 Feb 2016 14:56:35 -0800 Subject: Fix crash --- src/core/iomgr/ev_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/iomgr/ev_posix.c b/src/core/iomgr/ev_posix.c index fbfa13c347..0c0c9be9ad 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); -- cgit v1.2.3 From 2fad50d214b1b394c3b1a9f0d0ad9af1256c20b3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 8 Mar 2016 07:52:42 -0800 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/iomgr/ev_poll_and_epoll_posix.c b/src/core/iomgr/ev_poll_and_epoll_posix.c index 080f22396a..fd554107bf 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 8878aa61bc..5cc5bc3c68 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 -- cgit v1.2.3 From 45b135e2f56ade45ecb9e6dc040edda595eb99c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:02:39 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index c2977c7b3f..7489cc67fb 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 a7844ea8e5..eb9f7a2365 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); } -- cgit v1.2.3 From 0027de17fc5e75af5ab5379f0e689223d0c81a3e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:04:40 -0700 Subject: Remove unused declaration --- src/core/transport/chttp2/internal.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 7489cc67fb..7c97c7e33d 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; -- cgit v1.2.3 From 1907fc6ee9b26880f781eeee5459971d79d7337e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:05:54 -0700 Subject: Swap order of functions to reduce diff --- src/core/transport/chttp2_transport.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index eb9f7a2365..596e01f5c9 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)) { -- cgit v1.2.3 From 223ae1c682dc56eefaae40f3fa28dd2b38d624d5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:08:35 -0700 Subject: Fix inadvertently reverted code --- src/core/transport/chttp2_transport.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 596e01f5c9..a82440701d 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)); } -- cgit v1.2.3 From b4f7cbd339ea89e1f736aa22c86ad72ad69decec Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:22:37 -0700 Subject: Fix stack corruption --- src/core/transport/chttp2_transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index a82440701d..83739db1e2 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, -- cgit v1.2.3 From a67a83ebde2ab47b230857d47330ac63c7ab62b1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 21:43:59 -0700 Subject: Move the most important member first --- src/core/transport/transport.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 56ac927e36..908ef0bda4 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; -- cgit v1.2.3 From 2c8063cc7200789da67a10c53d98d0d15b1ad378 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 22:12:15 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/census/grpc_filter.c b/src/core/census/grpc_filter.c index c8aaf31e2d..987407f050 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 3e61688364..1869597975 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 52362f0b20..4407333aff 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 f021a8ae32..27d6e03d28 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 3e7ca08fd2..d5d5fc2e35 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 e7ed3ccfeb..e6e9daa452 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 1aa27208c2..26f1110ac4 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 370f8dbe42..6c97a0762d 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 8f150a8d81..7a61df40df 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 332d4259d2..c72bfc40e6 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 3d8e5e8d35..3d348c8266 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 d9808e6f4c..e7861b8e3b 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 58f89946d2..9ef88bba65 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 da93474b26..88554e4224 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 182c713ee7..3a73826c3a 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 5b5af0e7d0..b42980431a 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 908ef0bda4..ddb81f9a34 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 d9ecc4d2ba..9d53971f4d 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 e19e9a57ae..ca7c57c94e 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); } -- cgit v1.2.3 From 414217e22c019d8c23e528fb010091244506d896 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 25 Mar 2016 13:31:06 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index b22818ea87..1e7d1b0028 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 8c5ed6532b..7f6c4d3de2 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 3a73826c3a..8f660a537f 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; -- cgit v1.2.3 From a3b54cdff87181193bf66022d204635ddb24cd80 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 25 Mar 2016 15:59:55 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c index 3ab4430668..5a617e1e48 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 7f6c4d3de2..e447b0d422 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 60fe735cfc..053ded1bc3 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 8f660a537f..d71061452a 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 ddb81f9a34..c7778df47d 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; -- cgit v1.2.3 From 489b4744bee765e11825f0918c4f75bc9d09f1f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 26 Mar 2016 13:38:29 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/channel/channel_stack.c b/src/core/channel/channel_stack.c index 1869597975..8fbf8438f6 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 8063dfbb21..a5655ce79b 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 4a6944eef7..f7ae6003c8 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 -- cgit v1.2.3 From d12bdd11cb9e320fe9be2ab13c43d7c4f27094e0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 26 Mar 2016 16:01:00 -0700 Subject: Fix inadvertent race --- src/core/transport/chttp2_transport.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index d71061452a..227591bf18 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); -- cgit v1.2.3 From caf606f0794818930ff9e531567d95cf8b20b9f8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 26 Mar 2016 18:09:56 -0700 Subject: Turn off debug --- src/core/transport/transport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index c7778df47d..ddb81f9a34 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; -- cgit v1.2.3 From 086f91cab6d32dc5b0609cf3735937309f04b18d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 4 Apr 2016 23:23:08 -0700 Subject: Fix include guards --- src/core/lib/iomgr/ev_poll_posix.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.h b/src/core/lib/iomgr/ev_poll_posix.h index 6acf50db08..291736a2db 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 */ -- cgit v1.2.3 From ed73510413579bcaf07aea363da1dc238bcb8c4e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Apr 2016 12:59:23 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 973e40ca1e..79b5ceebe3 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 e9675fb785..d3259e724d 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 b064ed6775..537655804a 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 -- cgit v1.2.3 From 76cfc6ac97cd542f331aff60aaa273fccdaed815 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 7 Apr 2016 18:32:44 -0700 Subject: Some comments --- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core') 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 3c8127e1a8..306d312dc4 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) { -- cgit v1.2.3 From 42b004a2a5f785094f6c9bccaf4090e2c7c6e9b5 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 8 Apr 2016 14:41:49 -0700 Subject: 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(-) (limited to 'src/core') 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 306d312dc4..77a67d2007 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 0eb95a2e09..af4126c900 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 1fa9f5ef2d..4cfa83e6a2 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 cfb5251684..03318151cc 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 ad8ee8c7a9..25b6886f24 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); -- cgit v1.2.3 From fe115892d52b96946f3e661616468de059347e5c Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 12 Apr 2016 09:24:38 -0700 Subject: 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(-) (limited to 'src/core') 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 77a67d2007..5800b37210 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 03318151cc..7045a26052 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 25b6886f24..cbfd245874 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( -- cgit v1.2.3 From 5e28d71f3de6e4edc72b703e07b43709d8cc783f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 12 Apr 2016 10:45:07 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index af4126c900..8c6ec90684 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 4cfa83e6a2..344bf63438 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 */ -- cgit v1.2.3 From c4b18a50de3ab04b189c9f0e2b56cb08a9f15542 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 04:53:54 +0200 Subject: 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 (limited to 'src/core') diff --git a/BUILD b/BUILD index fa9a120989..237322a5e1 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 488d6f4dce..fdc523907d 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 8efc8a2b8e..492b75f8fd 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 a6feea5074..4a0663452d 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 7d3d899a40..acd798741f 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 82c5eaac41..b3122dd272 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 b8cfc4e6c4..3e0677ebdc 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 3242f07599..bbcb4098e3 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 2f4c625539..b21e974c8e 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 6940dec7b0..53f58477a4 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 7ee689a7e4..3996823933 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 ef84c941df..e670e1e8d0 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 ff3febb38e..ca04c022e3 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 ba78497a0a..29735bd18c 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 0000000000..fd14ce54e4 --- /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 a2f9857356..8382cde15a 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 f7acbd14a6..9e924ab3f4 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 0000000000..f0f803aa75 --- /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 9e0e7ad808..0cd4bb6fc3 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 0cb2904f8d..9ac73128c3 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 1f7f2a196b..e389782b47 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 2b6d3dd223..154d607ec7 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 3155a4ece6..62468a5a61 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 b131a55b59..e0d9714828 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 0b68315c82..b9a004423c 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 cdb128e48e..26195bb541 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 8af6fdd44c..be15391b09 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 -- cgit v1.2.3 From b7c34a50f1e0e529e7446158f6e6eb54e37b3fa8 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 07:40:44 +0200 Subject: Removing grpc_tcp_server_port_fd* from the Windows implementation. --- src/core/lib/iomgr/tcp_server_windows.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 53f58477a4..125f521d87 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, -- cgit v1.2.3 From 344f55b7baad4fce6be0d5c7007b43f5f270e359 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 07:52:25 +0200 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 3996823933..551149e1a6 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 fd14ce54e4..c0586a3fbb 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 8382cde15a..eabd9c6883 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 -- cgit v1.2.3 From 95953bfd7f71c1555aaf7d9a158295c4720fa9da Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 07:58:22 +0200 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/support/string_util_win32.c b/src/core/lib/support/string_util_win32.c index c0586a3fbb..f3cb0c050f 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 eabd9c6883..9b398b89c5 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 -- cgit v1.2.3 From 94a353aa460e618071572cd42f2106353fda6abe Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 16 Apr 2016 01:21:05 +0200 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/support/string_win32.c b/src/core/lib/support/string_win32.c index 9b398b89c5..6b92f79253 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; } -- cgit v1.2.3 From 2e7d957a63c9bcfe0235f8b5d55fd9a372a32ced Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 15 Apr 2016 17:29:57 -0700 Subject: 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 ++++++++++++++++++++++ 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, 51 insertions(+) (limited to 'src/core') diff --git a/grpc.def b/grpc.def index f81aa1b05a..5e2de0ad2a 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 5c868aece3..0ca28c0fef 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 6581bbd3d1..8deb3442de 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 8bd6ae6372..37e7930a55 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 272e85b485..380b065733 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 56db4ec686..8633f9347c 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 c526f434c6..da328367d5 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 -- cgit v1.2.3 From f02bada24fc67bc1a6e93108ce466d969a04afd1 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 19 Apr 2016 14:12:27 -0700 Subject: remove defaut case in grpc_call_error_to_string --- src/core/lib/surface/call.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 8deb3442de..02bc019332 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"); } -- cgit v1.2.3 From 1f5e262589c84c2b5eb9416211bffd1f32998009 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 21 Apr 2016 12:28:09 -0700 Subject: Add the option of adding a non-listening server completion queue. This makes writing certain test cases (like hybrid_end2end tests) easier --- include/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(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 56864d6d53..d489a90c69 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 86c7fecef5..85af9aa57f 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 5c868aece3..059bd2ebc7 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 5ec8808b50..f6f7ac880c 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 eef82cf014..ee3e044840 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 cbfd245874..c34ec04d2d 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 68cc38258c..5445d3e13b 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 02043a89d3..0423448154 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(); } -- cgit v1.2.3 From 01907123f6323a7494551e7a45e342dcdc068864 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 21 Apr 2016 15:09:13 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/grpc.def b/grpc.def index f81aa1b05a..943b464c31 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 d489a90c69..1b84b44705 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 85af9aa57f..5275bd3ac1 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 059bd2ebc7..ee15b9d88d 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 f6f7ac880c..d5eb24270e 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 ee3e044840..1528ca4ad8 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 c34ec04d2d..0a84d8e7cd 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 c0d13951d7..9cd7cb2da3 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 6cc473be74..83166cd410 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 8bd6ae6372..edad9a3131 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 272e85b485..7354de4ba2 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 56db4ec686..149ce6c48a 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 c526f434c6..098319db77 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 239d552c57..97d4e60d90 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 e69b4b4dfe..c6f70a623d 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 c190ba40b6..bb54a23814 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 9fc6271976..e11e25dc09 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 bbcebf11cc..97359277ce 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 e9099bac04..2dfaa2372f 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 28ca8b3271..fc0567f670 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 7dac54ec51..5f33e73465 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" ] -- cgit v1.2.3 From f5df6472b4028166ea1d51f15bb8ed1455fde472 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 23 Apr 2016 01:53:46 +0200 Subject: Refactor. --- src/core/lib/support/tmpfile_msys.c | 14 ++++++-------- third_party/boringssl | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/support/tmpfile_msys.c b/src/core/lib/support/tmpfile_msys.c index f0f803aa75..2fdc89a64f 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 907ae62b9d..c880e42ba1 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 +Subproject commit c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 -- cgit v1.2.3 From 7f0793ad623ae1dd2b175306a0e7eb060d53511b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 25 Apr 2016 12:35:58 -0700 Subject: 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 +- src/core/ext/lb_policy/grpclb/load_balancer_api.c | 14 +- src/core/ext/lb_policy/grpclb/load_balancer_api.h | 10 +- .../grpclb/proto/grpc/lb/v0/load_balancer.pb.c | 119 -------------- .../grpclb/proto/grpc/lb/v0/load_balancer.pb.h | 182 --------------------- .../grpclb/proto/grpc/lb/v1/load_balancer.pb.c | 118 +++++++++++++ .../grpclb/proto/grpc/lb/v1/load_balancer.pb.h | 178 ++++++++++++++++++++ src/proto/grpc/lb/v0/load_balancer.options | 6 - src/proto/grpc/lb/v0/load_balancer.proto | 144 ---------------- src/proto/grpc/lb/v1/load_balancer.options | 6 + src/proto/grpc/lb/v1/load_balancer.proto | 141 ++++++++++++++++ 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 +- .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 4 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 12 +- .../test/grpclb_api_test/grpclb_api_test.vcxproj | 8 +- .../grpclb_api_test.vcxproj.filters | 8 +- 31 files changed, 525 insertions(+), 538 deletions(-) delete mode 100644 src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c delete mode 100644 src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h create mode 100644 src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c 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 delete mode 100644 src/proto/grpc/lb/v0/load_balancer.proto create mode 100644 src/proto/grpc/lb/v1/load_balancer.options create mode 100644 src/proto/grpc/lb/v1/load_balancer.proto (limited to 'src/core') diff --git a/BUILD b/BUILD index f8e7661ad4..ff5220bc8e 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 12022c2dd9..027a24664a 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 058743edbf..0fecc66c46 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 26308e8db5..d5cfb3c2d6 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 2d930a648e..c60297213d 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 d66e03354b..6f631c1c55 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 f83b7d3587..1512da6b56 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 d192ebde2c..295901aaff 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 459d6d9954..59b89997dd 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 968f7d278a..71b5616d0c 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.c b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c deleted file mode 100644 index 9719673181..0000000000 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c +++ /dev/null @@ -1,119 +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 constant definitions */ -/* Generated by nanopb-0.3.5-dev */ - -#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h" - -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - - -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), - 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), - 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), - 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), - 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), - 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), - 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), - 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), - PB_LAST_FIELD -}; - - -/* Check that field information fits in pb_field_t */ -#if !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_32BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * 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) -#endif - -#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_16BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * 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) -#endif - - 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 3599f881bb..0000000000 --- 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/v1/load_balancer.pb.c b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c new file mode 100644 index 0000000000..52e11c40bb --- /dev/null +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c @@ -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. + * + */ +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.3.5-dev */ + +#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. +#endif + + + +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_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_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_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_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_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_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_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 +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * 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_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) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +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 0000000000..d5dc39ab94 --- /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 6d4528f838..0000000000 --- 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/v0/load_balancer.proto b/src/proto/grpc/lb/v0/load_balancer.proto deleted file mode 100644 index e88a4f8c4a..0000000000 --- a/src/proto/grpc/lb/v0/load_balancer.proto +++ /dev/null @@ -1,144 +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. - -syntax = "proto3"; - -package grpc.lb.v0; - -message Duration { - - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} - -service LoadBalancer { - // Bidirectional rpc to get a list of servers. - rpc BalanceLoad(stream LoadBalanceRequest) - returns (stream LoadBalanceResponse); -} - -message LoadBalanceRequest { - oneof load_balance_request_type { - // This message should be sent on the first request to the load balancer. - InitialLoadBalanceRequest initial_request = 1; - - // The client stats should be periodically reported to the load balancer - // based on the duration defined in the InitialLoadBalanceResponse. - ClientStats client_stats = 2; - } -} - -message InitialLoadBalanceRequest { - // Name of load balanced service (IE, service.grpc.gslb.google.com) - string name = 1; -} - -// Contains client level statistics that are useful to load balancing. Each -// count should be reset to zero after reporting the stats. -message ClientStats { - // The total number of requests sent by the client since the last report. - int64 total_requests = 1; - - // The number of client rpc errors since the last report. - int64 client_rpc_errors = 2; - - // The number of dropped requests since the last report. - int64 dropped_requests = 3; -} - -message LoadBalanceResponse { - oneof load_balance_response_type { - // This message should be sent on the first response to the client. - InitialLoadBalanceResponse initial_response = 1; - - // Contains the list of servers selected by the load balancer. The client - // should send requests to these servers in the specified order. - ServerList server_list = 2; - } -} - -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; - - // This is an application layer redirect that indicates the client should - // use the specified server for load balancing. When this field is set in - // the response, the client should open a separate connection to the - // load_balancer_delegate and call the BalanceLoad method. - string load_balancer_delegate = 2; - } - - // This interval defines how often the client should send the client stats - // to the load balancer. Stats should only be reported when the duration is - // positive. - Duration client_stats_report_interval = 3; -} - -message ServerList { - // Contains a list of servers selected by the load balancer. The list will - // be updated when server resolutions change or as needed to balance load - // across more servers. The client should consume the server list in order - // unless instructed otherwise via the client_config. - repeated Server servers = 1; - - // Indicates the amount of time that the client should consider this server - // list as valid. It may be considered stale after waiting this interval of - // time after receiving the list. If the interval is not positive, the - // client can assume the list is valid until the next list is received. - Duration expiration_interval = 3; -} - -message Server { - // A resolved address and port for the server. The IP address string may - // either be an IPv4 or IPv6 address. - string ip_address = 1; - int32 port = 2; - - // 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; - - // Indicates whether this particular request should be dropped by the client - // when this server is chosen from the list. - bool drop_request = 4; -} 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 0000000000..d90366996e --- /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/v1/load_balancer.proto b/src/proto/grpc/lb/v1/load_balancer.proto new file mode 100644 index 0000000000..1bcad0b1d4 --- /dev/null +++ b/src/proto/grpc/lb/v1/load_balancer.proto @@ -0,0 +1,141 @@ +// 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.lb.v1; + +message Duration { + + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. + int64 seconds = 1; + + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + int32 nanos = 2; +} + +service LoadBalancer { + // Bidirectional rpc to get a list of servers. + rpc BalanceLoad(stream LoadBalanceRequest) + returns (stream LoadBalanceResponse); +} + +message LoadBalanceRequest { + oneof load_balance_request_type { + // This message should be sent on the first request to the load balancer. + InitialLoadBalanceRequest initial_request = 1; + + // The client stats should be periodically reported to the load balancer + // based on the duration defined in the InitialLoadBalanceResponse. + ClientStats client_stats = 2; + } +} + +message InitialLoadBalanceRequest { + // Name of load balanced service (IE, service.grpc.gslb.google.com) + string name = 1; +} + +// Contains client level statistics that are useful to load balancing. Each +// count should be reset to zero after reporting the stats. +message ClientStats { + // The total number of requests sent by the client since the last report. + int64 total_requests = 1; + + // The number of client rpc errors since the last report. + int64 client_rpc_errors = 2; + + // The number of dropped requests since the last report. + int64 dropped_requests = 3; +} + +message LoadBalanceResponse { + oneof load_balance_response_type { + // This message should be sent on the first response to the client. + InitialLoadBalanceResponse initial_response = 1; + + // Contains the list of servers selected by the load balancer. The client + // should send requests to these servers in the specified order. + ServerList server_list = 2; + } +} + +message InitialLoadBalanceResponse { + oneof initial_response_type { + // 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 + // the response, the client should open a separate connection to the + // load_balancer_delegate and call the BalanceLoad method. + string load_balancer_delegate = 2; + } + + // This interval defines how often the client should send the client stats + // to the load balancer. Stats should only be reported when the duration is + // positive. + Duration client_stats_report_interval = 3; +} + +message ServerList { + // Contains a list of servers selected by the load balancer. The list will + // be updated when server resolutions change or as needed to balance load + // across more servers. The client should consume the server list in order + // unless instructed otherwise via the client_config. + repeated Server servers = 1; + + // Indicates the amount of time that the client should consider this server + // list as valid. It may be considered stale after waiting this interval of + // time after receiving the list. If the interval is not positive, the + // client can assume the list is valid until the next list is received. + Duration expiration_interval = 3; +} + +message Server { + // A resolved address and port for the server. The IP address string may + // either be an IPv4 or IPv6 address. + string ip_address = 1; + int32 port = 2; + + // 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. + string load_balance_token = 3; + + // Indicates whether this particular request should be dropped by the client + // when this server is chosen from the list. + bool drop_request = 4; +} diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index c5a0a398b4..e1fe5fc1f6 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 92f93c869c..bf77878e0a 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 e2d2f672e9..b216a20379 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 897a899e7e..b1fdb942cd 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 92cb8ecbb4..c0707051a6 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 3a774a70d6..ebf573d3b2 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 38e68f3b1a..2599df2303 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 4eec05a3b1..26109c7102 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 17c88c4805..8d7072b04a 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 26050dcf74..31ab8f4ba4 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 a4acf513bc..869d92c738 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 1509ece9f9..91b11a1f0f 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 6c57b8c162..50f0a3eac2 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} -- cgit v1.2.3 From eb913107f75073f24e0ade0fd18f526195db78b7 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 25 Apr 2016 17:30:04 -0700 Subject: Init tracers after plugin registration --- src/core/lib/surface/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 03f379aba8..d7ee122f87 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(); } -- cgit v1.2.3 From c5b1eef8b1e6d56a9f3c25962d815ae6579c78ee Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 26 Apr 2016 14:16:20 -0700 Subject: 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 (limited to 'src/core') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index c140c61b8f..ad3462bff4 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 06ee73c82e..2640cc9cb8 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 ac0fdde876..d6b85aefb5 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 0000000000..f70920f372 --- /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 -- cgit v1.2.3 From 773d9908aa90652df9ac47a9ab16467658d32dd4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 26 Apr 2016 18:27:31 -0700 Subject: Fix refcounting bug for mdstrs --- src/core/lib/transport/metadata.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 779efbb97d..5847ec9053 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); } } -- cgit v1.2.3 From 9859d8d2969ab28541a91b77a321d9c7265c45fd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 26 Apr 2016 21:07:53 -0700 Subject: Fix use-after-free --- src/core/lib/surface/call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index f33688beef..3f31e77247 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); } -- cgit v1.2.3 From cce51fe5ac8a394ed6e3ca5b1d9c504148bbf345 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 26 Apr 2016 21:36:29 -0700 Subject: 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(+) (limited to 'src/core') diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 3d42d0e616..d423aa464e 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 0d973329c4..cf5879d82e 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 03f379aba8..736e8b296f 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(); -- cgit v1.2.3 From a93e5a49e3d04c2f72e320040a15121e4d88b5d3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 26 Apr 2016 21:47:49 -0700 Subject: Fix use-after-free --- .../transport/chttp2/transport/chttp2_transport.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 24448714a8..fcf2abfe66 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)); -- cgit v1.2.3 From 640d71dda90fee3dbb66f1b50c9b42058d063244 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 27 Apr 2016 07:17:58 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index ad3462bff4..192783f4ed 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 -- cgit v1.2.3 From 1f3319bc88009355a07cbc757e007a659c5beaf8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 27 Apr 2016 10:59:19 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 192783f4ed..59dded6342 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 d6b85aefb5..3ae6eb3592 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; } -- cgit v1.2.3 From ac2e88f9567c7e90f615738fb759537385dcc858 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 27 Apr 2016 14:13:27 -0700 Subject: 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 ++ .../transport/chttp2/transport/chttp2_transport.c | 15 +++++++++++ .../transport/chttp2/transport/incoming_metadata.c | 1 + .../transport/chttp2/transport/incoming_metadata.h | 1 + src/core/ext/transport/chttp2/transport/internal.h | 3 +++ src/core/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(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 4c7373006b..b5203b6e4d 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 01507f5ca6..c24950a189 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 db21744f0c..3e463a7995 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 17ecf8e181..7db5db8de0 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 98cd38abd4..d547a6e9c1 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 e827a43f7a..0cf4d87f3c 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 713d9e6782..277c257933 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 77afe588d7..5f1a33242e 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 b3e07c45a5..a54065950d 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 0e5d6b4fe0..f09b55a2c0 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) {} -- cgit v1.2.3 From 9b7b62b59909ce1712291382156cf212d0b0caf4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 09:45:51 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 7d78beb15a..111e0231f7 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); -- cgit v1.2.3 From 4cbaccfa60ae2e4e9ec0e6f8b14b285823868e60 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 09:46:49 -0700 Subject: clang-format --- src/core/lib/iomgr/tcp_client_windows.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 111e0231f7..66f9ff7a46 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) { -- cgit v1.2.3 From 0c6070f68d5dbac069fd19e1ddc394c2ea3c4775 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 28 Apr 2016 11:26:34 -0700 Subject: Mark stream as cancelled if we exceed the metadata size limit. Also take this opportunity to convert the seen_error field to a bool. --- .../transport/chttp2/transport/chttp2_transport.c | 31 ++++++++++++++++------ src/core/ext/transport/chttp2/transport/internal.h | 6 +++-- src/core/ext/transport/chttp2/transport/parsing.c | 14 ++++++---- test/core/end2end/tests/large_metadata.c | 8 +++--- 4 files changed, 40 insertions(+), 19 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index c24950a189..b73ec2a7e9 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 d547a6e9c1..be38ffda1f 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 0cf4d87f3c..11cbb80ca8 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 f09b55a2c0..2aa6381e9e 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 { -- cgit v1.2.3 From 1b9c0a2123bc8e2e3c4a6a7b35e22a7b2b17a69f Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Fri, 29 Apr 2016 08:28:48 -0700 Subject: Remove duplicate instance of grpc_global_wakeup_fd --- src/core/lib/iomgr/ev_posix.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 0eb95a2e09..7df1751352 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())) { -- cgit v1.2.3 From c2de452309c91b934382c2ea77eff5d9e53caad1 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 29 Apr 2016 10:25:27 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 277c257933..77c32c72de 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); -- cgit v1.2.3 From 00598719bcf40a95505f2deeb53906c5944373fd Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 29 Apr 2016 13:38:50 -0700 Subject: Use HTTP/2 MAX_HEADER_LIST_SIZE setting instead of adding a new member in the grpc_chttp2_transport_parsing struct. --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 11 ++++------- src/core/ext/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(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b73ec2a7e9..6314786525 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 a3c1e15f35..7fa66247e4 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 be38ffda1f..2884b3be9b 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 11cbb80ca8..f101873337 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); -- cgit v1.2.3 From fad045004d5576a3f2d32f6d27b0fc285ff589d0 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 16:43:46 -0700 Subject: 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(-) (limited to 'src/core') 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 3f6051b892..dcdc0c6285 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 fcf2abfe66..02ad0c0370 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 555027c866..ebeee37f0d 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 4d64506de2..295f31c44f 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); } -- cgit v1.2.3 From 4ee1a627230c8564dfdab5247e8703e0eb10d5c8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 29 Apr 2016 16:47:27 -0700 Subject: 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 +++---- .../ext/transport/chttp2/transport/chttp2_transport.c | 17 ++++++++++++----- src/core/ext/transport/chttp2/transport/internal.h | 3 ++- 3 files changed, 17 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index aea1a6acec..d081b7d9c5 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 fcf2abfe66..8c8593748d 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 7a8084641d..a269338b49 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? */ -- cgit v1.2.3 From 615da649926677bf00b165cb183d97233fcd46c8 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 18:14:05 -0700 Subject: explicitly cast constant value to gpr_atm --- src/core/ext/client_config/subchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 3a5af9f53d..bd45d3825c 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); } -- cgit v1.2.3 From 088aa27adfd0852a36f7e6eedf77cad8eb896ef2 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 18:15:43 -0700 Subject: format fixes --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 02ad0c0370..9ca551f0c5 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; -- cgit v1.2.3 From 7a5f019bd3a086f4024724be936d6cd87b963daa Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 29 Apr 2016 19:34:25 -0700 Subject: Removed leftover function declaration from channel args --- src/core/lib/channel/channel_args.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 0a51780a14..23c7b7b897 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); -- cgit v1.2.3 From e98b494db77f9b10522cf6a8238deb8d7bd55345 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 30 Apr 2016 14:11:33 -0700 Subject: Fix bug where max_frame_size was ignored Also add corpus entries that helped diagnose this bug --- src/core/ext/transport/chttp2/transport/internal.h | 8 +- src/core/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 .../crash-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 (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 7a8084641d..04c75619df 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 e827a43f7a..2995066e51 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 0000000000..503af15fe8 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/03a72675e1969f836094f1ecfec2a7b34418e306 differ 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 0000000000..30229f98fd Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/0416afd6875d9ba55f1e5f86a6456a5445d5e576 differ diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/08c42ef29eff83052c5887855f2fa3e07ebe470c b/test/core/end2end/fuzzers/server_fuzzer_corpus/08c42ef29eff83052c5887855f2fa3e07ebe470c new file mode 100644 index 0000000000..828275ee3c Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/08c42ef29eff83052c5887855f2fa3e07ebe470c differ 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 0000000000..6ed060d1e3 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/1ba889ea1543297824e99e641e6ca8b91f45732e differ diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/3b09bf453c6f93983c24c4d5481e55d66213f93a b/test/core/end2end/fuzzers/server_fuzzer_corpus/3b09bf453c6f93983c24c4d5481e55d66213f93a new file mode 100644 index 0000000000..1a7a213cd7 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/3b09bf453c6f93983c24c4d5481e55d66213f93a differ 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 0000000000..7f975251dd Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/49cb33cbb60f041e8e99dd718993acd2c3354416 differ 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 0000000000..3038fde547 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/59743fe120be6ae1aed1c02230ee1bb460f621ee differ 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 0000000000..9d39854fc9 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/a5ccb8f124d8ddb5350b90bc0d6b96db280cb7c9 differ 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 0000000000..338f61bdce Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/a7fac1265a384fe9e45a9ee3d708b79c4e80505e differ 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 0000000000..dab9c75822 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/aaf049720c707d4e14e47e7eb31d6a2dda60e66a differ diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/c4e4c7572e005e18d56eac407033da058737a5ab b/test/core/end2end/fuzzers/server_fuzzer_corpus/c4e4c7572e005e18d56eac407033da058737a5ab new file mode 100644 index 0000000000..070a581b37 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/c4e4c7572e005e18d56eac407033da058737a5ab differ 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 0000000000..b6dfd77e67 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/crash-dae0f07934a527989f23f06e630710ff6ca8c809 differ 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 0000000000..df9241dd0c Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/e96ad9c17795e52edc810a08d4fc61fe8790002a differ 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 0000000000..0ba5935164 Binary files /dev/null and b/test/core/end2end/fuzzers/server_fuzzer_corpus/fa202a5f51cd49f8ea5af60c5f403f797c01c504 differ diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 0fd77854d2..cf1154426f 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -57757,6 +57757,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/03a72675e1969f836094f1ecfec2a7b34418e306" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/03b9be1fa172dff5d1543be079b9c64fa2c9a278" @@ -57773,6 +57789,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/0416afd6875d9ba55f1e5f86a6456a5445d5e576" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/052c8f28e5884bb48f0d504461272cd3a5893215" @@ -57917,6 +57949,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/08c42ef29eff83052c5887855f2fa3e07ebe470c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/09938e3256d06a8e168eb038d8a58b8462f7f697" @@ -58365,6 +58413,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/1ba889ea1543297824e99e641e6ca8b91f45732e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/1cf17783de9e662f3720847f2d83d86dcdcab500" @@ -59149,6 +59213,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/3b09bf453c6f93983c24c4d5481e55d66213f93a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/3ca5da2f.bin" @@ -59501,6 +59581,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/49cb33cbb60f041e8e99dd718993acd2c3354416" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/4aa883d0.bin" @@ -59949,6 +60045,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/59743fe120be6ae1aed1c02230ee1bb460f621ee" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/597fdab5.bin" @@ -61341,6 +61453,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/a5ccb8f124d8ddb5350b90bc0d6b96db280cb7c9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/a7e64803.bin" @@ -61357,6 +61485,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/a7fac1265a384fe9e45a9ee3d708b79c4e80505e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/a8d229374635fa6f2a75ca1669892e1bc244e719" @@ -61501,6 +61645,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/aaf049720c707d4e14e47e7eb31d6a2dda60e66a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/ad810f7f.bin" @@ -61965,6 +62125,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/c4e4c7572e005e18d56eac407033da058737a5ab" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/c559f565.bin" @@ -62269,6 +62445,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/crash-dae0f07934a527989f23f06e630710ff6ca8c809" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/crash-e34b0a9a428001cb4094a9ebca76329f578811a4" @@ -62589,6 +62781,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/e96ad9c17795e52edc810a08d4fc61fe8790002a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/e9bbe2fe47b7b9c2683e7f17f4a33625c6ffbd8c" @@ -62909,6 +63117,22 @@ "linux" ] }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/fa202a5f51cd49f8ea5af60c5f403f797c01c504" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/fa36b4280d9e28edd81c5e4d192d1a5c2765e5e4" -- cgit v1.2.3 From a49b13bc332a38dfcf83162003cbaa0a1384143b Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 19 Apr 2016 10:31:25 -0700 Subject: cronet wrapper code --- include/grpc/grpc_security.h | 5 + .../cronet/client/secure/cronet_channel_create.c | 72 +++ .../transport/cronet/transport/cronet_c_for_grpc.h | 202 +++++++ .../transport/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 (limited to 'src/core') diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 79199cc5d6..d753aaf96c 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 0000000000..23189809f7 --- /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 0000000000..15a511aebd --- /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 0000000000..3b9b1b08d8 --- /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 -- cgit v1.2.3 From df665073044eac553b2844450cb68a6eafbc0d01 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 19 Apr 2016 14:23:56 -0700 Subject: moved cronet_c_for_grpc.h in third_party --- .../transport/cronet/transport/cronet_c_for_grpc.h | 202 --------------------- .../transport/cronet/transport/cronet_transport.c | 2 +- third_party/objective_c/Cronet/cronet_c_for_grpc.h | 202 +++++++++++++++++++++ 3 files changed, 203 insertions(+), 203 deletions(-) delete mode 100644 src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h create mode 100644 third_party/objective_c/Cronet/cronet_c_for_grpc.h (limited to 'src/core') 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 deleted file mode 100644 index 15a511aebd..0000000000 --- a/src/core/ext/transport/cronet/transport/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/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 3b9b1b08d8..671bee638e 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/third_party/objective_c/Cronet/cronet_c_for_grpc.h b/third_party/objective_c/Cronet/cronet_c_for_grpc.h new file mode 100644 index 0000000000..15a511aebd --- /dev/null +++ b/third_party/objective_c/Cronet/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_ -- cgit v1.2.3 From 77044830ff927c7c55a342030e2e2a9d73d0d723 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Mon, 25 Apr 2016 09:27:49 -0700 Subject: fixed clang formating --- include/grpc/grpc_security.h | 5 ++--- .../cronet/client/secure/cronet_channel_create.c | 12 ++++++------ .../ext/transport/cronet/transport/cronet_transport.c | 19 ++++++++----------- 3 files changed, 16 insertions(+), 20 deletions(-) (limited to 'src/core') diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index d753aaf96c..150ad05a27 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 23189809f7..914c567086 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 671bee638e..5c27a4ea00 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; -- cgit v1.2.3 From be5186a79dee5ca96254b6d38fa2401522987f63 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 27 Apr 2016 13:47:10 -0700 Subject: created new grpc_cronet.h. Addressed feedback from jcanizales@ and ctiller@ --- include/grpc/grpc_cronet.h | 51 ++++ .../cronet/client/secure/cronet_channel_create.c | 22 +- .../transport/cronet/transport/cronet_transport.c | 315 ++++++++++++--------- 3 files changed, 245 insertions(+), 143 deletions(-) create mode 100644 include/grpc/grpc_cronet.h (limited to 'src/core') diff --git a/include/grpc/grpc_cronet.h b/include/grpc/grpc_cronet.h new file mode 100644 index 0000000000..295e0f55e8 --- /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 914c567086..96baa3984b 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 5c27a4ea00..c2bb9e0393 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 -- cgit v1.2.3 From 2389ad629514cdd58f0fda0042f04b89b4013d44 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 29 Apr 2016 14:49:59 -0700 Subject: Clang formatting fixes --- .../cronet/client/secure/cronet_channel_create.c | 2 +- .../transport/cronet/transport/cronet_transport.c | 106 +++++++++++---------- 2 files changed, 57 insertions(+), 51 deletions(-) (limited to 'src/core') 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 96baa3984b..a6cb1f70a7 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 c2bb9e0393..d337e84606 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 -- cgit v1.2.3 From 125590f9d5ebc53271846401d6087e47eced9897 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 2 May 2016 07:37:16 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 77c32c72de..4ecbbd1b1b 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 4567221a48..4e1cd8e2c1 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 b62668876e..7af823f7ca 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, -- cgit v1.2.3 From ebbbce3e6e6f08a9d35292296cbd066b0a4c4a67 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 2 May 2016 09:54:04 -0700 Subject: 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. --- .../transport/chttp2/transport/chttp2_transport.c | 85 ++++++++++++++-------- test/core/end2end/tests/large_metadata.c | 35 ++++----- 2 files changed, 70 insertions(+), 50 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 6314786525..1eaffc6692 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 2aa6381e9e..b78d5b8292 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) {} -- cgit v1.2.3 From 8a1d8052eb8629643333ca4449180e27f65aa8dc Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 3 May 2016 10:44:56 -0700 Subject: 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 +- .../transport/chttp2/transport/chttp2_transport.c | 24 +- .../transport/chttp2/transport/frame_rst_stream.c | 5 + src/core/ext/transport/chttp2/transport/internal.h | 15 +- src/core/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 +- test/core/bad_client/tests/connection_prefix.c | 49 +-- test/core/bad_client/tests/headers.c | 120 +++--- .../core/bad_client/tests/initial_settings_frame.c | 54 +-- test/core/bad_client/tests/large_metadata.c | 478 +++++++++++++++++++++ test/core/bad_client/tests/large_metadata.headers | 106 +++++ .../bad_client/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 +++++++++ .../large_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 (limited to 'src/core') diff --git a/Makefile b/Makefile index 922e0b0568..e85a5266fe 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 8ca51baa47..7858021600 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 6ee5e0680c..221c7c8050 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 22467e9ddd..7f01105e3e 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 d8f17a30fc..2f3714b2bb 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 f101873337..29c26fb3bc 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 cd5b541249..aa9125dc7a 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 19ddba83bf..b6e8a6dd5b 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 d49858ed6d..fb86525b1a 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 b17e3b35ee..5d9ffef3f2 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 9a30aad0e9..bc5ed2e393 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 4c1a76743e..f872e5006a 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 63a770df91..b84b67a7e5 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 0000000000..95932205cf --- /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 0000000000..75de3ef100 --- /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 60d3b890b2..6216553a61 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 3ae6eb3592..25bbe968e4 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 f3870a1813..4f483d21f2 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 96e6c67fa6..ee476267f2 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 f546f3b995..e20d808fef 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 0fd77854d2..4a6c137327 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 bdae447545..be8b5d40ac 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 0000000000..0a14694b75 --- /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 0000000000..5eb9a5e7cb --- /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} + + + + -- cgit v1.2.3 From 274bcc8f0b50bfef7fe1dd5cc33ebaa6b13edba0 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 3 May 2016 17:34:54 -0700 Subject: 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 ++ .../cronet/client/secure/cronet_channel_create.c | 3 - .../transport/cronet/transport/cronet_api_dummy.c | 91 ++++++++++++++++++++++ .../transport/cronet/transport/cronet_transport.c | 6 +- src/python/grpcio/grpc/_cython/imports.generated.c | 2 + src/python/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 + test/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 (limited to 'src/core') diff --git a/BUILD b/BUILD index b4b10b535e..2e1d762f07 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 922e0b0568..c6fd3b40f7 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 4314ab7243..12a745ffb0 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 441752dc3d..a7ab412722 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 74f9ad242a..5259e679ba 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 77d35bd2c7..f57ba74519 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 61948ed1b8..09a94a6cd0 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 e68cd81da7..488f4657cd 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 ffb1c56ed6..e8fd375eb6 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 a6cb1f70a7..df1acddcc0 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 0000000000..200f9f7daa --- /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 d337e84606..64bd5f5778 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 f0a40dbb35..09551472b5 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 d5e810b7cf..54c8aaad13 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 dab62530aa..5314329c2c 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 bc43f9d36b..cebbe8c40f 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 b67361ca25..d7ea6c574c 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 0eede6c23b..65f3e1738a 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 034d9c6e6f..a582d76a58 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 1b1453f7ea..16dcd9b79a 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 f546f3b995..e22318d238 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 4eec05a3b1..cbf854875a 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 17c88c4805..02297b7746 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} + -- cgit v1.2.3 From a93c4353e79b2913769cc78cecd1da15a6b0e089 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 3 May 2016 21:23:58 -0700 Subject: clang-format fixes --- .../transport/cronet/transport/cronet_api_dummy.c | 22 ++++++++-------------- .../transport/cronet/transport/cronet_transport.c | 4 +++- 2 files changed, 11 insertions(+), 15 deletions(-) (limited to 'src/core') 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 200f9f7daa..687026c9fd 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 64bd5f5778..5da4b873fb 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) { -- cgit v1.2.3 From e5c1a154a4b3b2a3afb4efc0447a74e410cdb074 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 3 May 2016 21:49:21 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 5da4b873fb..5bb085195c 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; -- cgit v1.2.3 From 525654a164a8862e14de913753100345932af2fc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 22:38:41 -0700 Subject: Fix undefined behavior --- src/core/ext/client_config/subchannel_index.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_config/subchannel_index.c b/src/core/ext/client_config/subchannel_index.c index ab8d9bd91d..b77632bba3 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); } -- cgit v1.2.3 From 68897999237ab5d67278365b3bd444960fa3c4c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 23:10:07 -0700 Subject: 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 +++++- .../ext/transport/chttp2/transport/frame_goaway.c | 2 +- .../ext/transport/chttp2/transport/hpack_parser.c | 5 +++++ src/core/lib/channel/channel_args.c | 2 +- src/core/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(-) (limited to 'src/core') diff --git a/build.yaml b/build.yaml index 441752dc3d..4cf7057a90 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 bd45d3825c..cfd39e7cfb 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 b77632bba3..69de0e78c1 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 69accb7696..aa25b1a231 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 687936bfd3..9278a7ac42 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 28d2d78d00..1659c3788b 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 7039364b7b..820871d579 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 5711fff0c0..7137c1f313 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 5847ec9053..53fe03bdc9 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 b133a948ee..b6150151d5 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 325e9aa929..1a67544d18 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 }, { -- cgit v1.2.3 From bc846725376821d62ac35bd21fc542fb4c712930 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 4 May 2016 10:53:50 -0700 Subject: 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. --- .../ext/transport/chttp2/transport/chttp2_transport.c | 4 ++++ .../ext/transport/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(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index f5359f2a81..44b2a7a59f 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 7fa66247e4..a3c1e15f35 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 7210aef5d5..e2869224f1 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 863673a4e0..8c50eeb5d5 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 1403b760f5..0ec6ad437e 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 a6487a17ac..ff413ffd65 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 c1cf01d39a..89f95f09f9 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 b78d5b8292..6d3074a94b 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; -- cgit v1.2.3 From 22b338e2109745a27f1f84de8490bc8148df1a79 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 4 May 2016 13:27:56 -0700 Subject: Apply clang-format diffs. --- .../transport/chttp2/transport/chttp2_transport.c | 14 +++--- .../transport/chttp2/transport/incoming_metadata.h | 2 +- src/core/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(-) (limited to 'src/core') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 44b2a7a59f..737a6ccbf1 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 7db5db8de0..df4343b93e 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 9516956724..4bd374b7fa 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 4ecbbd1b1b..6d82f4d681 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 4e1cd8e2c1..c0afc715bc 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 aa9125dc7a..e5820688ef 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 b6e8a6dd5b..ecd6721a78 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 95932205cf..b3521439f5 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 0ec6ad437e..151a86cb8f 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 ff413ffd65..f6e01ec41c 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 89f95f09f9..75b75d1331 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 6d3074a94b..dd29552b97 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; -- cgit v1.2.3 From 8ca294e417217e1577609052f18df84be437c03c Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 2 May 2016 14:56:30 -0700 Subject: 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 +- .../chttp2/client/secure/secure_channel_create.c | 6 +- .../chttp2/server/secure/server_secure_chttp2.c | 8 +- src/core/lib/http/httpcli_security_connector.c | 2 +- src/core/lib/security/auth_filters.h | 42 - src/core/lib/security/b64.c | 233 ---- src/core/lib/security/b64.h | 52 - src/core/lib/security/client_auth_filter.c | 336 ----- src/core/lib/security/context/security_context.c | 347 ++++++ src/core/lib/security/context/security_context.h | 114 ++ src/core/lib/security/credentials.c | 1296 -------------------- src/core/lib/security/credentials.h | 377 ------ .../credentials/composite/composite_credentials.c | 263 ++++ .../credentials/composite/composite_credentials.h | 72 ++ src/core/lib/security/credentials/credentials.c | 233 ++++ src/core/lib/security/credentials/credentials.h | 236 ++++ .../security/credentials/credentials_metadata.c | 101 ++ .../security/credentials/fake/fake_credentials.c | 139 +++ .../security/credentials/fake/fake_credentials.h | 56 + .../credentials/google_default/credentials_posix.c | 61 + .../credentials/google_default/credentials_win32.c | 61 + .../google_default/google_default_credentials.c | 268 ++++ .../google_default/google_default_credentials.h | 47 + .../lib/security/credentials/iam/iam_credentials.c | 87 ++ .../lib/security/credentials/iam/iam_credentials.h | 47 + src/core/lib/security/credentials/jwt/json_token.c | 321 +++++ src/core/lib/security/credentials/jwt/json_token.h | 88 ++ .../lib/security/credentials/jwt/jwt_credentials.c | 161 +++ .../lib/security/credentials/jwt/jwt_credentials.h | 63 + .../lib/security/credentials/jwt/jwt_verifier.c | 843 +++++++++++++ .../lib/security/credentials/jwt/jwt_verifier.h | 136 ++ .../credentials/oauth2/oauth2_credentials.c | 430 +++++++ .../credentials/oauth2/oauth2_credentials.h | 111 ++ .../credentials/plugin/plugin_credentials.c | 131 ++ .../credentials/plugin/plugin_credentials.h | 48 + .../lib/security/credentials/ssl/ssl_credentials.c | 244 ++++ .../lib/security/credentials/ssl/ssl_credentials.h | 49 + src/core/lib/security/credentials_metadata.c | 101 -- src/core/lib/security/credentials_posix.c | 61 - src/core/lib/security/credentials_win32.c | 61 - src/core/lib/security/google_default_credentials.c | 266 ---- src/core/lib/security/handshake.c | 336 ----- src/core/lib/security/handshake.h | 51 - src/core/lib/security/json_token.c | 411 ------- src/core/lib/security/json_token.h | 118 -- src/core/lib/security/jwt_verifier.c | 843 ------------- src/core/lib/security/jwt_verifier.h | 136 -- src/core/lib/security/secure_endpoint.c | 384 ------ src/core/lib/security/secure_endpoint.h | 49 - src/core/lib/security/security_connector.c | 838 ------------- src/core/lib/security/security_connector.h | 266 ---- src/core/lib/security/security_context.c | 347 ------ src/core/lib/security/security_context.h | 114 -- src/core/lib/security/server_auth_filter.c | 264 ---- src/core/lib/security/transport/auth_filters.h | 42 + .../lib/security/transport/client_auth_filter.c | 336 +++++ src/core/lib/security/transport/handshake.c | 336 +++++ src/core/lib/security/transport/handshake.h | 51 + src/core/lib/security/transport/secure_endpoint.c | 384 ++++++ src/core/lib/security/transport/secure_endpoint.h | 49 + .../lib/security/transport/security_connector.c | 838 +++++++++++++ .../lib/security/transport/security_connector.h | 266 ++++ .../lib/security/transport/server_auth_filter.c | 264 ++++ src/core/lib/security/util/b64.c | 233 ++++ src/core/lib/security/util/b64.h | 52 + 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 +- .../security/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 +- test/core/surface/secure_channel_create_test.c | 4 +- test/core/surface/server_chttp2_test.c | 3 +- test/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 ++- 105 files changed, 8435 insertions(+), 7368 deletions(-) delete mode 100644 src/core/lib/security/auth_filters.h delete mode 100644 src/core/lib/security/b64.c delete mode 100644 src/core/lib/security/b64.h delete mode 100644 src/core/lib/security/client_auth_filter.c create mode 100644 src/core/lib/security/context/security_context.c create mode 100644 src/core/lib/security/context/security_context.h delete mode 100644 src/core/lib/security/credentials.c delete mode 100644 src/core/lib/security/credentials.h 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 create mode 100644 src/core/lib/security/credentials/credentials.h create mode 100644 src/core/lib/security/credentials/credentials_metadata.c create mode 100644 src/core/lib/security/credentials/fake/fake_credentials.c create mode 100644 src/core/lib/security/credentials/fake/fake_credentials.h create mode 100644 src/core/lib/security/credentials/google_default/credentials_posix.c create mode 100644 src/core/lib/security/credentials/google_default/credentials_win32.c create mode 100644 src/core/lib/security/credentials/google_default/google_default_credentials.c 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 create mode 100644 src/core/lib/security/credentials/jwt/json_token.c create mode 100644 src/core/lib/security/credentials/jwt/json_token.h create mode 100644 src/core/lib/security/credentials/jwt/jwt_credentials.c create mode 100644 src/core/lib/security/credentials/jwt/jwt_credentials.h create mode 100644 src/core/lib/security/credentials/jwt/jwt_verifier.c create mode 100644 src/core/lib/security/credentials/jwt/jwt_verifier.h 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 delete mode 100644 src/core/lib/security/credentials_metadata.c delete mode 100644 src/core/lib/security/credentials_posix.c delete mode 100644 src/core/lib/security/credentials_win32.c delete mode 100644 src/core/lib/security/google_default_credentials.c delete mode 100644 src/core/lib/security/handshake.c delete mode 100644 src/core/lib/security/handshake.h delete mode 100644 src/core/lib/security/json_token.c delete mode 100644 src/core/lib/security/json_token.h delete mode 100644 src/core/lib/security/jwt_verifier.c delete mode 100644 src/core/lib/security/jwt_verifier.h delete mode 100644 src/core/lib/security/secure_endpoint.c delete mode 100644 src/core/lib/security/secure_endpoint.h delete mode 100644 src/core/lib/security/security_connector.c delete mode 100644 src/core/lib/security/security_connector.h delete mode 100644 src/core/lib/security/security_context.c delete mode 100644 src/core/lib/security/security_context.h delete mode 100644 src/core/lib/security/server_auth_filter.c create mode 100644 src/core/lib/security/transport/auth_filters.h create mode 100644 src/core/lib/security/transport/client_auth_filter.c create mode 100644 src/core/lib/security/transport/handshake.c create mode 100644 src/core/lib/security/transport/handshake.h create mode 100644 src/core/lib/security/transport/secure_endpoint.c create mode 100644 src/core/lib/security/transport/secure_endpoint.h create mode 100644 src/core/lib/security/transport/security_connector.c create mode 100644 src/core/lib/security/transport/security_connector.h create mode 100644 src/core/lib/security/transport/server_auth_filter.c create mode 100644 src/core/lib/security/util/b64.c create mode 100644 src/core/lib/security/util/b64.h create mode 100644 src/core/lib/security/util/json_util.c create mode 100644 src/core/lib/security/util/json_util.h (limited to 'src/core') diff --git a/BUILD b/BUILD index b4b10b535e..ac16f07cd0 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 922e0b0568..64ecf38f49 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 4314ab7243..06e742ca43 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 441752dc3d..1d869009f4 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 74f9ad242a..40e827d1dd 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 77d35bd2c7..9ae4ea7c6e 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 e68cd81da7..ffdce9dd24 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 ffb1c56ed6..06c00bdb03 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 58af6f995a..a262306085 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 698b2bef61..2c9f013c23 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 ea4bff30d4..5590928968 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/auth_filters.h b/src/core/lib/security/auth_filters.h deleted file mode 100644 index 7fb56c3f3a..0000000000 --- a/src/core/lib/security/auth_filters.h +++ /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. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_AUTH_FILTERS_H -#define GRPC_CORE_LIB_SECURITY_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 */ diff --git a/src/core/lib/security/b64.c b/src/core/lib/security/b64.c deleted file mode 100644 index 87f0e05280..0000000000 --- a/src/core/lib/security/b64.c +++ /dev/null @@ -1,233 +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/b64.h" - -#include -#include - -#include -#include -#include - -/* --- Constants. --- */ - -static const int8_t base64_bytes[] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 0x3E, -1, -1, -1, 0x3F, - 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, -1, -1, - -1, 0x7F, -1, -1, -1, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, - 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, - 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, -1, -1, -1, -1, -1, - -1, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, - 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, - 0x31, 0x32, 0x33, -1, -1, -1, -1, -1}; - -static const char base64_url_unsafe_chars[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char base64_url_safe_chars[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - -#define GRPC_BASE64_PAD_CHAR '=' -#define GRPC_BASE64_PAD_BYTE 0x7F -#define GRPC_BASE64_MULTILINE_LINE_LEN 76 -#define GRPC_BASE64_MULTILINE_NUM_BLOCKS (GRPC_BASE64_MULTILINE_LINE_LEN / 4) - -/* --- base64 functions. --- */ - -char *grpc_base64_encode(const void *vdata, size_t data_size, int url_safe, - int multiline) { - const unsigned char *data = vdata; - const char *base64_chars = - url_safe ? base64_url_safe_chars : base64_url_unsafe_chars; - size_t result_projected_size = - 4 * ((data_size + 3) / 3) + - 2 * (multiline ? (data_size / (3 * GRPC_BASE64_MULTILINE_NUM_BLOCKS)) - : 0) + - 1; - char *result = gpr_malloc(result_projected_size); - char *current = result; - size_t num_blocks = 0; - size_t i = 0; - - /* Encode each block. */ - while (data_size >= 3) { - *current++ = base64_chars[(data[i] >> 2) & 0x3F]; - *current++ = - base64_chars[((data[i] & 0x03) << 4) | ((data[i + 1] >> 4) & 0x0F)]; - *current++ = - base64_chars[((data[i + 1] & 0x0F) << 2) | ((data[i + 2] >> 6) & 0x03)]; - *current++ = base64_chars[data[i + 2] & 0x3F]; - - data_size -= 3; - i += 3; - if (multiline && (++num_blocks == GRPC_BASE64_MULTILINE_NUM_BLOCKS)) { - *current++ = '\r'; - *current++ = '\n'; - num_blocks = 0; - } - } - - /* Take care of the tail. */ - if (data_size == 2) { - *current++ = base64_chars[(data[i] >> 2) & 0x3F]; - *current++ = - base64_chars[((data[i] & 0x03) << 4) | ((data[i + 1] >> 4) & 0x0F)]; - *current++ = base64_chars[(data[i + 1] & 0x0F) << 2]; - *current++ = GRPC_BASE64_PAD_CHAR; - } else if (data_size == 1) { - *current++ = base64_chars[(data[i] >> 2) & 0x3F]; - *current++ = base64_chars[(data[i] & 0x03) << 4]; - *current++ = GRPC_BASE64_PAD_CHAR; - *current++ = GRPC_BASE64_PAD_CHAR; - } - - GPR_ASSERT(current >= result); - GPR_ASSERT((uintptr_t)(current - result) < result_projected_size); - result[current - result] = '\0'; - return result; -} - -gpr_slice grpc_base64_decode(const char *b64, int url_safe) { - return grpc_base64_decode_with_len(b64, strlen(b64), url_safe); -} - -static void decode_one_char(const unsigned char *codes, unsigned char *result, - size_t *result_offset) { - uint32_t packed = ((uint32_t)codes[0] << 2) | ((uint32_t)codes[1] >> 4); - result[(*result_offset)++] = (unsigned char)packed; -} - -static void decode_two_chars(const unsigned char *codes, unsigned char *result, - size_t *result_offset) { - uint32_t packed = ((uint32_t)codes[0] << 10) | ((uint32_t)codes[1] << 4) | - ((uint32_t)codes[2] >> 2); - result[(*result_offset)++] = (unsigned char)(packed >> 8); - result[(*result_offset)++] = (unsigned char)(packed); -} - -static int decode_group(const unsigned char *codes, size_t num_codes, - unsigned char *result, size_t *result_offset) { - GPR_ASSERT(num_codes <= 4); - - /* Short end groups that may not have padding. */ - if (num_codes == 1) { - gpr_log(GPR_ERROR, "Invalid group. Must be at least 2 bytes."); - return 0; - } - if (num_codes == 2) { - decode_one_char(codes, result, result_offset); - return 1; - } - if (num_codes == 3) { - decode_two_chars(codes, result, result_offset); - return 1; - } - - /* Regular 4 byte groups with padding or not. */ - GPR_ASSERT(num_codes == 4); - if (codes[0] == GRPC_BASE64_PAD_BYTE || codes[1] == GRPC_BASE64_PAD_BYTE) { - gpr_log(GPR_ERROR, "Invalid padding detected."); - return 0; - } - if (codes[2] == GRPC_BASE64_PAD_BYTE) { - if (codes[3] == GRPC_BASE64_PAD_BYTE) { - decode_one_char(codes, result, result_offset); - } else { - gpr_log(GPR_ERROR, "Invalid padding detected."); - return 0; - } - } else if (codes[3] == GRPC_BASE64_PAD_BYTE) { - decode_two_chars(codes, result, result_offset); - } else { - /* No padding. */ - uint32_t packed = ((uint32_t)codes[0] << 18) | ((uint32_t)codes[1] << 12) | - ((uint32_t)codes[2] << 6) | codes[3]; - result[(*result_offset)++] = (unsigned char)(packed >> 16); - result[(*result_offset)++] = (unsigned char)(packed >> 8); - result[(*result_offset)++] = (unsigned char)(packed); - } - return 1; -} - -gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, - int url_safe) { - gpr_slice result = gpr_slice_malloc(b64_len); - unsigned char *current = GPR_SLICE_START_PTR(result); - size_t result_size = 0; - unsigned char codes[4]; - size_t num_codes = 0; - - while (b64_len--) { - unsigned char c = (unsigned char)(*b64++); - signed char code; - if (c >= GPR_ARRAY_SIZE(base64_bytes)) continue; - if (url_safe) { - if (c == '+' || c == '/') { - gpr_log(GPR_ERROR, "Invalid character for url safe base64 %c", c); - goto fail; - } - if (c == '-') { - c = '+'; - } else if (c == '_') { - c = '/'; - } - } - code = base64_bytes[c]; - if (code == -1) { - if (c != '\r' && c != '\n') { - gpr_log(GPR_ERROR, "Invalid character %c", c); - goto fail; - } - } else { - codes[num_codes++] = (unsigned char)code; - if (num_codes == 4) { - if (!decode_group(codes, num_codes, current, &result_size)) goto fail; - num_codes = 0; - } - } - } - - if (num_codes != 0 && - !decode_group(codes, num_codes, current, &result_size)) { - goto fail; - } - GPR_SLICE_SET_LENGTH(result, result_size); - return result; - -fail: - gpr_slice_unref(result); - return gpr_empty_slice(); -} diff --git a/src/core/lib/security/b64.h b/src/core/lib/security/b64.h deleted file mode 100644 index c515e7af2c..0000000000 --- a/src/core/lib/security/b64.h +++ /dev/null @@ -1,52 +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_SECURITY_B64_H -#define GRPC_CORE_LIB_SECURITY_B64_H - -#include - -/* Encodes data using base64. It is the caller's responsability to free - the returned char * using gpr_free. Returns NULL on NULL input. */ -char *grpc_base64_encode(const void *data, size_t data_size, int url_safe, - int multiline); - -/* Decodes data according to the base64 specification. Returns an empty - slice in case of failure. */ -gpr_slice grpc_base64_decode(const char *b64, int url_safe); - -/* Same as above except that the length is provided by the caller. */ -gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, - int url_safe); - -#endif /* GRPC_CORE_LIB_SECURITY_B64_H */ diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c deleted file mode 100644 index 8b58cb86bf..0000000000 --- a/src/core/lib/security/client_auth_filter.c +++ /dev/null @@ -1,336 +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/auth_filters.h" - -#include - -#include -#include -#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/support/string.h" -#include "src/core/lib/surface/call.h" -#include "src/core/lib/transport/static_metadata.h" - -#define MAX_CREDENTIALS_METADATA_COUNT 4 - -/* We can have a per-call credentials. */ -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; - grpc_transport_stream_op op; - uint8_t security_context_set; - grpc_linked_mdelem md_links[MAX_CREDENTIALS_METADATA_COUNT]; - grpc_auth_metadata_context auth_md_context; -} call_data; - -/* We can have a per-channel credentials. */ -typedef struct { - grpc_channel_security_connector *security_connector; - grpc_auth_context *auth_context; -} channel_data; - -static void reset_auth_metadata_context( - grpc_auth_metadata_context *auth_md_context) { - if (auth_md_context->service_url != NULL) { - gpr_free((char *)auth_md_context->service_url); - auth_md_context->service_url = NULL; - } - if (auth_md_context->method_name != NULL) { - gpr_free((char *)auth_md_context->method_name); - auth_md_context->method_name = NULL; - } - GRPC_AUTH_CONTEXT_UNREF( - (grpc_auth_context *)auth_md_context->channel_auth_context, - "grpc_auth_metadata_context"); - auth_md_context->channel_auth_context = NULL; -} - -static void bubble_up_error(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_status_code status, const char *error_msg) { - call_data *calld = elem->call_data; - gpr_log(GPR_ERROR, "Client side authentication failure: %s", error_msg); - grpc_transport_stream_op_add_cancellation(&calld->op, status); - grpc_call_next_op(exec_ctx, elem, &calld->op); -} - -static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_credentials_md *md_elems, - size_t num_md, - grpc_credentials_status status) { - grpc_call_element *elem = (grpc_call_element *)user_data; - call_data *calld = elem->call_data; - grpc_transport_stream_op *op = &calld->op; - grpc_metadata_batch *mdb; - size_t i; - reset_auth_metadata_context(&calld->auth_md_context); - if (status != GRPC_CREDENTIALS_OK) { - bubble_up_error(exec_ctx, elem, GRPC_STATUS_UNAUTHENTICATED, - "Credentials failed to get metadata."); - return; - } - GPR_ASSERT(num_md <= MAX_CREDENTIALS_METADATA_COUNT); - GPR_ASSERT(op->send_initial_metadata != NULL); - mdb = op->send_initial_metadata; - for (i = 0; i < num_md; i++) { - grpc_metadata_batch_add_tail( - mdb, &calld->md_links[i], - grpc_mdelem_from_slices(gpr_slice_ref(md_elems[i].key), - gpr_slice_ref(md_elems[i].value))); - } - grpc_call_next_op(exec_ctx, elem, op); -} - -void build_auth_metadata_context(grpc_security_connector *sc, - grpc_auth_context *auth_context, - call_data *calld) { - char *service = gpr_strdup(grpc_mdstr_as_c_string(calld->method)); - char *last_slash = strrchr(service, '/'); - char *method_name = NULL; - char *service_url = NULL; - reset_auth_metadata_context(&calld->auth_md_context); - if (last_slash == NULL) { - gpr_log(GPR_ERROR, "No '/' found in fully qualified method name"); - service[0] = '\0'; - } else if (last_slash == service) { - /* No service part in fully qualified method name: will just be "/". */ - service[1] = '\0'; - } else { - *last_slash = '\0'; - method_name = gpr_strdup(last_slash + 1); - } - if (method_name == NULL) method_name = gpr_strdup(""); - gpr_asprintf(&service_url, "%s://%s%s", - sc->url_scheme == NULL ? "" : sc->url_scheme, - grpc_mdstr_as_c_string(calld->host), service); - calld->auth_md_context.service_url = service_url; - calld->auth_md_context.method_name = method_name; - calld->auth_md_context.channel_auth_context = - GRPC_AUTH_CONTEXT_REF(auth_context, "grpc_auth_metadata_context"); - gpr_free(service); -} - -static void send_security_metadata(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_transport_stream_op *op) { - call_data *calld = elem->call_data; - channel_data *chand = elem->channel_data; - grpc_client_security_context *ctx = - (grpc_client_security_context *)op->context[GRPC_CONTEXT_SECURITY].value; - grpc_call_credentials *channel_call_creds = - chand->security_connector->request_metadata_creds; - int call_creds_has_md = (ctx != NULL) && (ctx->creds != NULL); - - if (channel_call_creds == NULL && !call_creds_has_md) { - /* Skip sending metadata altogether. */ - grpc_call_next_op(exec_ctx, elem, op); - return; - } - - if (channel_call_creds != NULL && call_creds_has_md) { - 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, - "Incompatible credentials set on channel and call."); - return; - } - } else { - calld->creds = grpc_call_credentials_ref( - call_creds_has_md ? ctx->creds : channel_call_creds); - } - - 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); - grpc_call_credentials_get_request_metadata( - exec_ctx, calld->creds, calld->pollset, calld->auth_md_context, - on_credentials_metadata, elem); -} - -static void on_host_checked(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_security_status status) { - grpc_call_element *elem = (grpc_call_element *)user_data; - call_data *calld = elem->call_data; - - if (status == GRPC_SECURITY_OK) { - send_security_metadata(exec_ctx, elem, &calld->op); - } else { - 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); - gpr_free(error_msg); - } -} - -/* Called either: - - in response to an API call (or similar) from above, to send something - - a network event (or similar) from below, to receive something - op contains type and call direction information, in addition to the data - that is being sent or received. */ -static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_transport_stream_op *op) { - /* grab pointers to our data from the call element */ - call_data *calld = elem->call_data; - channel_data *chand = elem->channel_data; - grpc_linked_mdelem *l; - grpc_client_security_context *sec_ctx = NULL; - - if (calld->security_context_set == 0 && - op->cancel_with_status == GRPC_STATUS_OK) { - calld->security_context_set = 1; - GPR_ASSERT(op->context); - if (op->context[GRPC_CONTEXT_SECURITY].value == NULL) { - op->context[GRPC_CONTEXT_SECURITY].value = - grpc_client_security_context_create(); - op->context[GRPC_CONTEXT_SECURITY].destroy = - grpc_client_security_context_destroy; - } - sec_ctx = op->context[GRPC_CONTEXT_SECURITY].value; - GRPC_AUTH_CONTEXT_UNREF(sec_ctx->auth_context, "client auth filter"); - sec_ctx->auth_context = - GRPC_AUTH_CONTEXT_REF(chand->auth_context, "client_auth_filter"); - } - - if (op->send_initial_metadata != NULL) { - for (l = op->send_initial_metadata->list.head; l != NULL; l = l->next) { - grpc_mdelem *md = l->md; - /* Pointer comparison is OK for md_elems created from the same context. - */ - if (md->key == GRPC_MDSTR_AUTHORITY) { - if (calld->host != NULL) GRPC_MDSTR_UNREF(calld->host); - calld->host = GRPC_MDSTR_REF(md->value); - } else if (md->key == GRPC_MDSTR_PATH) { - if (calld->method != NULL) GRPC_MDSTR_UNREF(calld->method); - calld->method = GRPC_MDSTR_REF(md->value); - } - } - if (calld->host != NULL) { - const char *call_host = grpc_mdstr_as_c_string(calld->host); - calld->op = *op; /* Copy op (originates from the caller's stack). */ - grpc_channel_security_connector_check_call_host( - exec_ctx, chand->security_connector, call_host, chand->auth_context, - on_host_checked, elem); - return; /* early exit */ - } - } - - /* pass control down the stack */ - grpc_call_next_op(exec_ctx, elem, op); -} - -/* Constructor for call_data */ -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)); -} - -static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_pollset *pollset) { - call_data *calld = elem->call_data; - calld->pollset = pollset; -} - -/* Destructor for call_data */ -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) { - GRPC_MDSTR_UNREF(calld->host); - } - if (calld->method != NULL) { - GRPC_MDSTR_UNREF(calld->method); - } - reset_auth_metadata_context(&calld->auth_md_context); -} - -/* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { - grpc_security_connector *sc = - grpc_find_security_connector_in_args(args->channel_args); - grpc_auth_context *auth_context = - grpc_find_auth_context_in_args(args->channel_args); - - /* grab pointers to our data from the channel element */ - channel_data *chand = elem->channel_data; - - /* The first and the last filters tend to be implemented differently to - handle the case that there's no 'next' filter to call on the up or down - path */ - GPR_ASSERT(!args->is_last); - GPR_ASSERT(sc != NULL); - GPR_ASSERT(auth_context != NULL); - - /* initialize members */ - chand->security_connector = - (grpc_channel_security_connector *)GRPC_SECURITY_CONNECTOR_REF( - sc, "client_auth_filter"); - chand->auth_context = - GRPC_AUTH_CONTEXT_REF(auth_context, "client_auth_filter"); -} - -/* Destructor for channel data */ -static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem) { - /* grab pointers to our data from the channel element */ - channel_data *chand = elem->channel_data; - grpc_channel_security_connector *sc = chand->security_connector; - if (sc != NULL) { - GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "client_auth_filter"); - } - 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"}; diff --git a/src/core/lib/security/context/security_context.c b/src/core/lib/security/context/security_context.c new file mode 100644 index 0000000000..127b13ee50 --- /dev/null +++ b/src/core/lib/security/context/security_context.c @@ -0,0 +1,347 @@ +/* + * + * 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 "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" + +#include +#include +#include +#include + +/* --- grpc_call --- */ + +grpc_call_error grpc_call_set_credentials(grpc_call *call, + grpc_call_credentials *creds) { + grpc_client_security_context *ctx = NULL; + GRPC_API_TRACE("grpc_call_set_credentials(call=%p, creds=%p)", 2, + (call, creds)); + if (!grpc_call_is_client(call)) { + gpr_log(GPR_ERROR, "Method is client-side only."); + return GRPC_CALL_ERROR_NOT_ON_SERVER; + } + ctx = (grpc_client_security_context *)grpc_call_context_get( + call, GRPC_CONTEXT_SECURITY); + if (ctx == NULL) { + ctx = grpc_client_security_context_create(); + ctx->creds = grpc_call_credentials_ref(creds); + grpc_call_context_set(call, GRPC_CONTEXT_SECURITY, ctx, + grpc_client_security_context_destroy); + } else { + grpc_call_credentials_unref(ctx->creds); + ctx->creds = grpc_call_credentials_ref(creds); + } + return GRPC_CALL_OK; +} + +grpc_auth_context *grpc_call_auth_context(grpc_call *call) { + void *sec_ctx = grpc_call_context_get(call, GRPC_CONTEXT_SECURITY); + GRPC_API_TRACE("grpc_call_auth_context(call=%p)", 1, (call)); + if (sec_ctx == NULL) return NULL; + return grpc_call_is_client(call) + ? GRPC_AUTH_CONTEXT_REF( + ((grpc_client_security_context *)sec_ctx)->auth_context, + "grpc_call_auth_context client") + : GRPC_AUTH_CONTEXT_REF( + ((grpc_server_security_context *)sec_ctx)->auth_context, + "grpc_call_auth_context server"); +} + +void grpc_auth_context_release(grpc_auth_context *context) { + GRPC_API_TRACE("grpc_auth_context_release(context=%p)", 1, (context)); + GRPC_AUTH_CONTEXT_UNREF(context, "grpc_auth_context_unref"); +} + +/* --- grpc_client_security_context --- */ + +grpc_client_security_context *grpc_client_security_context_create(void) { + grpc_client_security_context *ctx = + gpr_malloc(sizeof(grpc_client_security_context)); + memset(ctx, 0, sizeof(grpc_client_security_context)); + return ctx; +} + +void grpc_client_security_context_destroy(void *ctx) { + grpc_client_security_context *c = (grpc_client_security_context *)ctx; + grpc_call_credentials_unref(c->creds); + GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "client_security_context"); + gpr_free(ctx); +} + +/* --- grpc_server_security_context --- */ + +grpc_server_security_context *grpc_server_security_context_create(void) { + grpc_server_security_context *ctx = + gpr_malloc(sizeof(grpc_server_security_context)); + memset(ctx, 0, sizeof(grpc_server_security_context)); + return ctx; +} + +void grpc_server_security_context_destroy(void *ctx) { + grpc_server_security_context *c = (grpc_server_security_context *)ctx; + GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "server_security_context"); + gpr_free(ctx); +} + +/* --- grpc_auth_context --- */ + +static grpc_auth_property_iterator empty_iterator = {NULL, 0, NULL}; + +grpc_auth_context *grpc_auth_context_create(grpc_auth_context *chained) { + grpc_auth_context *ctx = gpr_malloc(sizeof(grpc_auth_context)); + memset(ctx, 0, sizeof(grpc_auth_context)); + gpr_ref_init(&ctx->refcount, 1); + if (chained != NULL) { + ctx->chained = GRPC_AUTH_CONTEXT_REF(chained, "chained"); + ctx->peer_identity_property_name = + ctx->chained->peer_identity_property_name; + } + return ctx; +} + +#ifdef GRPC_AUTH_CONTEXT_REFCOUNT_DEBUG +grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *ctx, + const char *file, int line, + const char *reason) { + if (ctx == NULL) return NULL; + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, + "AUTH_CONTEXT:%p ref %d -> %d %s", ctx, (int)ctx->refcount.count, + (int)ctx->refcount.count + 1, reason); +#else +grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *ctx) { + if (ctx == NULL) return NULL; +#endif + gpr_ref(&ctx->refcount); + return ctx; +} + +#ifdef GRPC_AUTH_CONTEXT_REFCOUNT_DEBUG +void grpc_auth_context_unref(grpc_auth_context *ctx, const char *file, int line, + const char *reason) { + if (ctx == NULL) return; + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, + "AUTH_CONTEXT:%p unref %d -> %d %s", ctx, (int)ctx->refcount.count, + (int)ctx->refcount.count - 1, reason); +#else +void grpc_auth_context_unref(grpc_auth_context *ctx) { + if (ctx == NULL) return; +#endif + if (gpr_unref(&ctx->refcount)) { + size_t i; + GRPC_AUTH_CONTEXT_UNREF(ctx->chained, "chained"); + if (ctx->properties.array != NULL) { + for (i = 0; i < ctx->properties.count; i++) { + grpc_auth_property_reset(&ctx->properties.array[i]); + } + gpr_free(ctx->properties.array); + } + gpr_free(ctx); + } +} + +const char *grpc_auth_context_peer_identity_property_name( + const grpc_auth_context *ctx) { + GRPC_API_TRACE("grpc_auth_context_peer_identity_property_name(ctx=%p)", 1, + (ctx)); + return ctx->peer_identity_property_name; +} + +int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context *ctx, + const char *name) { + grpc_auth_property_iterator it = + grpc_auth_context_find_properties_by_name(ctx, name); + const grpc_auth_property *prop = grpc_auth_property_iterator_next(&it); + GRPC_API_TRACE( + "grpc_auth_context_set_peer_identity_property_name(ctx=%p, name=%s)", 2, + (ctx, name)); + if (prop == NULL) { + gpr_log(GPR_ERROR, "Property name %s not found in auth context.", + name != NULL ? name : "NULL"); + return 0; + } + ctx->peer_identity_property_name = prop->name; + return 1; +} + +int grpc_auth_context_peer_is_authenticated(const grpc_auth_context *ctx) { + GRPC_API_TRACE("grpc_auth_context_peer_is_authenticated(ctx=%p)", 1, (ctx)); + return ctx->peer_identity_property_name == NULL ? 0 : 1; +} + +grpc_auth_property_iterator grpc_auth_context_property_iterator( + const grpc_auth_context *ctx) { + grpc_auth_property_iterator it = empty_iterator; + GRPC_API_TRACE("grpc_auth_context_property_iterator(ctx=%p)", 1, (ctx)); + if (ctx == NULL) return it; + it.ctx = ctx; + return it; +} + +const grpc_auth_property *grpc_auth_property_iterator_next( + grpc_auth_property_iterator *it) { + GRPC_API_TRACE("grpc_auth_property_iterator_next(it=%p)", 1, (it)); + if (it == NULL || it->ctx == NULL) return NULL; + while (it->index == it->ctx->properties.count) { + if (it->ctx->chained == NULL) return NULL; + it->ctx = it->ctx->chained; + it->index = 0; + } + if (it->name == NULL) { + return &it->ctx->properties.array[it->index++]; + } else { + while (it->index < it->ctx->properties.count) { + const grpc_auth_property *prop = &it->ctx->properties.array[it->index++]; + GPR_ASSERT(prop->name != NULL); + if (strcmp(it->name, prop->name) == 0) { + return prop; + } + } + /* We could not find the name, try another round. */ + return grpc_auth_property_iterator_next(it); + } +} + +grpc_auth_property_iterator grpc_auth_context_find_properties_by_name( + const grpc_auth_context *ctx, const char *name) { + grpc_auth_property_iterator it = empty_iterator; + GRPC_API_TRACE("grpc_auth_context_find_properties_by_name(ctx=%p, name=%s)", + 2, (ctx, name)); + if (ctx == NULL || name == NULL) return empty_iterator; + it.ctx = ctx; + it.name = name; + return it; +} + +grpc_auth_property_iterator grpc_auth_context_peer_identity( + const grpc_auth_context *ctx) { + GRPC_API_TRACE("grpc_auth_context_peer_identity(ctx=%p)", 1, (ctx)); + if (ctx == NULL) return empty_iterator; + return grpc_auth_context_find_properties_by_name( + ctx, ctx->peer_identity_property_name); +} + +static void ensure_auth_context_capacity(grpc_auth_context *ctx) { + if (ctx->properties.count == ctx->properties.capacity) { + ctx->properties.capacity = + GPR_MAX(ctx->properties.capacity + 8, ctx->properties.capacity * 2); + ctx->properties.array = + gpr_realloc(ctx->properties.array, + ctx->properties.capacity * sizeof(grpc_auth_property)); + } +} + +void grpc_auth_context_add_property(grpc_auth_context *ctx, const char *name, + const char *value, size_t value_length) { + grpc_auth_property *prop; + GRPC_API_TRACE( + "grpc_auth_context_add_property(ctx=%p, name=%s, value=%*.*s, " + "value_length=%lu)", + 6, (ctx, name, (int)value_length, (int)value_length, value, + (unsigned long)value_length)); + ensure_auth_context_capacity(ctx); + prop = &ctx->properties.array[ctx->properties.count++]; + prop->name = gpr_strdup(name); + prop->value = gpr_malloc(value_length + 1); + memcpy(prop->value, value, value_length); + prop->value[value_length] = '\0'; + prop->value_length = value_length; +} + +void grpc_auth_context_add_cstring_property(grpc_auth_context *ctx, + const char *name, + const char *value) { + grpc_auth_property *prop; + GRPC_API_TRACE( + "grpc_auth_context_add_cstring_property(ctx=%p, name=%s, value=%s)", 3, + (ctx, name, value)); + ensure_auth_context_capacity(ctx); + prop = &ctx->properties.array[ctx->properties.count++]; + prop->name = gpr_strdup(name); + prop->value = gpr_strdup(value); + prop->value_length = strlen(value); +} + +void grpc_auth_property_reset(grpc_auth_property *property) { + gpr_free(property->name); + gpr_free(property->value); + memset(property, 0, sizeof(grpc_auth_property)); +} + +static void auth_context_pointer_arg_destroy(void *p) { + GRPC_AUTH_CONTEXT_UNREF(p, "auth_context_pointer_arg"); +} + +static void *auth_context_pointer_arg_copy(void *p) { + return GRPC_AUTH_CONTEXT_REF(p, "auth_context_pointer_arg"); +} + +static int auth_context_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); } + +static const grpc_arg_pointer_vtable auth_context_pointer_vtable = { + auth_context_pointer_arg_copy, auth_context_pointer_arg_destroy, + auth_context_pointer_cmp}; + +grpc_arg grpc_auth_context_to_arg(grpc_auth_context *p) { + grpc_arg arg; + memset(&arg, 0, sizeof(grpc_arg)); + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_AUTH_CONTEXT_ARG; + arg.value.pointer.p = p; + arg.value.pointer.vtable = &auth_context_pointer_vtable; + return arg; +} + +grpc_auth_context *grpc_auth_context_from_arg(const grpc_arg *arg) { + if (strcmp(arg->key, GRPC_AUTH_CONTEXT_ARG) != 0) return NULL; + if (arg->type != GRPC_ARG_POINTER) { + gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, + GRPC_AUTH_CONTEXT_ARG); + return NULL; + } + return arg->value.pointer.p; +} + +grpc_auth_context *grpc_find_auth_context_in_args( + const grpc_channel_args *args) { + size_t i; + if (args == NULL) return NULL; + for (i = 0; i < args->num_args; i++) { + grpc_auth_context *p = grpc_auth_context_from_arg(&args->args[i]); + if (p != NULL) return p; + } + return NULL; +} diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h new file mode 100644 index 0000000000..ef0c06b1fb --- /dev/null +++ b/src/core/lib/security/context/security_context.h @@ -0,0 +1,114 @@ +/* + * + * 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_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/credentials.h" + +/* --- grpc_auth_context --- + + High level authentication context object. Can optionally be chained. */ + +/* Property names are always NULL terminated. */ + +typedef struct { + grpc_auth_property *array; + size_t count; + size_t capacity; +} grpc_auth_property_array; + +struct grpc_auth_context { + struct grpc_auth_context *chained; + grpc_auth_property_array properties; + gpr_refcount refcount; + const char *peer_identity_property_name; + grpc_pollset *pollset; +}; + +/* Creation. */ +grpc_auth_context *grpc_auth_context_create(grpc_auth_context *chained); + +/* Refcounting. */ +#ifdef GRPC_AUTH_CONTEXT_REFCOUNT_DEBUG +#define GRPC_AUTH_CONTEXT_REF(p, r) \ + grpc_auth_context_ref((p), __FILE__, __LINE__, (r)) +#define GRPC_AUTH_CONTEXT_UNREF(p, r) \ + grpc_auth_context_unref((p), __FILE__, __LINE__, (r)) +grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *policy, + const char *file, int line, + const char *reason); +void grpc_auth_context_unref(grpc_auth_context *policy, const char *file, + int line, const char *reason); +#else +#define GRPC_AUTH_CONTEXT_REF(p, r) grpc_auth_context_ref((p)) +#define GRPC_AUTH_CONTEXT_UNREF(p, r) grpc_auth_context_unref((p)) +grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *policy); +void grpc_auth_context_unref(grpc_auth_context *policy); +#endif + +void grpc_auth_property_reset(grpc_auth_property *property); + +/* --- grpc_client_security_context --- + + Internal client-side security context. */ + +typedef struct { + grpc_call_credentials *creds; + grpc_auth_context *auth_context; +} grpc_client_security_context; + +grpc_client_security_context *grpc_client_security_context_create(void); +void grpc_client_security_context_destroy(void *ctx); + +/* --- grpc_server_security_context --- + + Internal server-side security context. */ + +typedef struct { + grpc_auth_context *auth_context; +} grpc_server_security_context; + +grpc_server_security_context *grpc_server_security_context_create(void); +void grpc_server_security_context_destroy(void *ctx); + +/* --- Channel args for auth context --- */ +#define GRPC_AUTH_CONTEXT_ARG "grpc.auth_context" + +grpc_arg grpc_auth_context_to_arg(grpc_auth_context *c); +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_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 fd5ad3589b..0000000000 --- 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.h b/src/core/lib/security/credentials.h deleted file mode 100644 index 0373ceaa3f..0000000000 --- a/src/core/lib/security/credentials.h +++ /dev/null @@ -1,377 +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_SECURITY_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_H - -#include -#include -#include -#include "src/core/lib/transport/metadata_batch.h" - -#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" - -struct grpc_http_response; - -/* --- Constants. --- */ - -typedef enum { - GRPC_CREDENTIALS_OK = 0, - GRPC_CREDENTIALS_ERROR -} grpc_credentials_status; - -#define GRPC_FAKE_TRANSPORT_SECURITY_TYPE "fake" - -#define GRPC_CHANNEL_CREDENTIALS_TYPE_SSL "Ssl" -#define GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY \ - "FakeTransportSecurity" - -#define GRPC_CALL_CREDENTIALS_TYPE_OAUTH2 "Oauth2" -#define GRPC_CALL_CREDENTIALS_TYPE_JWT "Jwt" -#define GRPC_CALL_CREDENTIALS_TYPE_IAM "Iam" -#define GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE "Composite" - -#define GRPC_AUTHORIZATION_METADATA_KEY "authorization" -#define GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY \ - "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" -#define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH \ - "/computeMetadata/v1/instance/service-accounts/default/token" - -#define GRPC_GOOGLE_OAUTH2_SERVICE_HOST "www.googleapis.com" -#define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH "/oauth2/v3/token" - -#define GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX \ - "grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&" \ - "assertion=" - -#define GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING \ - "client_id=%s&client_secret=%s&refresh_token=%s&grant_type=refresh_token" - -/* --- Google utils --- */ - -/* It is the caller's responsibility to gpr_free the result if not NULL. */ -char *grpc_get_well_known_google_credentials_file_path(void); - -/* Implementation function for the different platforms. */ -char *grpc_get_well_known_google_credentials_file_path_impl(void); - -/* Override for testing only. Not thread-safe */ -typedef char *(*grpc_well_known_credentials_path_getter)(void); -void grpc_override_well_known_credentials_path_getter( - grpc_well_known_credentials_path_getter getter); - -/* --- grpc_channel_credentials. --- */ - -typedef struct { - void (*destruct)(grpc_channel_credentials *c); - - grpc_security_status (*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); -} grpc_channel_credentials_vtable; - -struct grpc_channel_credentials { - const grpc_channel_credentials_vtable *vtable; - const char *type; - gpr_refcount refcount; -}; - -grpc_channel_credentials *grpc_channel_credentials_ref( - grpc_channel_credentials *creds); -void grpc_channel_credentials_unref(grpc_channel_credentials *creds); - -/* Creates a security connector for the channel. May also create new channel - args for the channel to be used in place of the passed in const args if - returned non NULL. In that case the caller is responsible for destroying - new_args after channel creation. */ -grpc_security_status grpc_channel_credentials_create_security_connector( - grpc_channel_credentials *creds, const char *target, - const grpc_channel_args *args, grpc_channel_security_connector **sc, - grpc_channel_args **new_args); - -/* --- grpc_credentials_md. --- */ - -typedef struct { - gpr_slice key; - gpr_slice value; -} grpc_credentials_md; - -typedef struct { - grpc_credentials_md *entries; - size_t num_entries; - size_t allocated; - gpr_refcount refcount; -} grpc_credentials_md_store; - -grpc_credentials_md_store *grpc_credentials_md_store_create( - size_t initial_capacity); - -/* Will ref key and value. */ -void grpc_credentials_md_store_add(grpc_credentials_md_store *store, - gpr_slice key, gpr_slice value); -void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, - const char *key, const char *value); -grpc_credentials_md_store *grpc_credentials_md_store_ref( - grpc_credentials_md_store *store); -void grpc_credentials_md_store_unref(grpc_credentials_md_store *store); - -/* --- grpc_call_credentials. --- */ - -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); - -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_auth_metadata_context context, - grpc_credentials_metadata_cb cb, - void *user_data); -} grpc_call_credentials_vtable; - -struct grpc_call_credentials { - const grpc_call_credentials_vtable *vtable; - const char *type; - gpr_refcount refcount; -}; - -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_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 { - void (*destruct)(grpc_server_credentials *c); - grpc_security_status (*create_security_connector)( - grpc_server_credentials *c, grpc_server_security_connector **sc); -} grpc_server_credentials_vtable; - -struct grpc_server_credentials { - const grpc_server_credentials_vtable *vtable; - const char *type; - gpr_refcount refcount; - grpc_auth_metadata_processor processor; -}; - -grpc_security_status grpc_server_credentials_create_security_connector( - grpc_server_credentials *creds, grpc_server_security_connector **sc); - -grpc_server_credentials *grpc_server_credentials_ref( - grpc_server_credentials *creds); - -void grpc_server_credentials_unref(grpc_server_credentials *creds); - -#define GRPC_SERVER_CREDENTIALS_ARG "grpc.server_credentials" - -grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials *c); -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 -- */ - -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; - -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; - -/* -- 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; - -#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_H */ 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 0000000000..4a17f7c1b9 --- /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 0000000000..c83f74429f --- /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 0000000000..29cf9ee884 --- /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/credentials.h b/src/core/lib/security/credentials/credentials.h new file mode 100644 index 0000000000..5f44c7c3e3 --- /dev/null +++ b/src/core/lib/security/credentials/credentials.h @@ -0,0 +1,236 @@ +/* + * + * 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_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H + +#include +#include +#include +#include "src/core/lib/transport/metadata_batch.h" + +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" +#include "src/core/lib/security/transport/security_connector.h" + +struct grpc_http_response; + +/* --- Constants. --- */ + +typedef enum { + GRPC_CREDENTIALS_OK = 0, + GRPC_CREDENTIALS_ERROR +} grpc_credentials_status; + +#define GRPC_FAKE_TRANSPORT_SECURITY_TYPE "fake" + +#define GRPC_CHANNEL_CREDENTIALS_TYPE_SSL "Ssl" +#define GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY \ + "FakeTransportSecurity" + +#define GRPC_CALL_CREDENTIALS_TYPE_OAUTH2 "Oauth2" +#define GRPC_CALL_CREDENTIALS_TYPE_JWT "Jwt" +#define GRPC_CALL_CREDENTIALS_TYPE_IAM "Iam" +#define GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE "Composite" + +#define GRPC_AUTHORIZATION_METADATA_KEY "authorization" +#define GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY \ + "x-goog-iam-authorization-token" +#define GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY "x-goog-iam-authority-selector" + +#define GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS 60 + +#define GRPC_COMPUTE_ENGINE_METADATA_HOST "metadata" +#define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH \ + "/computeMetadata/v1/instance/service-accounts/default/token" + +#define GRPC_GOOGLE_OAUTH2_SERVICE_HOST "www.googleapis.com" +#define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH "/oauth2/v3/token" + +#define GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX \ + "grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&" \ + "assertion=" + +#define GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING \ + "client_id=%s&client_secret=%s&refresh_token=%s&grant_type=refresh_token" + +/* --- Google utils --- */ + +/* It is the caller's responsibility to gpr_free the result if not NULL. */ +char *grpc_get_well_known_google_credentials_file_path(void); + +/* Implementation function for the different platforms. */ +char *grpc_get_well_known_google_credentials_file_path_impl(void); + +/* Override for testing only. Not thread-safe */ +typedef char *(*grpc_well_known_credentials_path_getter)(void); +void grpc_override_well_known_credentials_path_getter( + grpc_well_known_credentials_path_getter getter); + +/* --- grpc_channel_credentials. --- */ + +typedef struct { + void (*destruct)(grpc_channel_credentials *c); + + grpc_security_status (*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); +} grpc_channel_credentials_vtable; + +struct grpc_channel_credentials { + const grpc_channel_credentials_vtable *vtable; + const char *type; + gpr_refcount refcount; +}; + +grpc_channel_credentials *grpc_channel_credentials_ref( + grpc_channel_credentials *creds); +void grpc_channel_credentials_unref(grpc_channel_credentials *creds); + +/* Creates a security connector for the channel. May also create new channel + args for the channel to be used in place of the passed in const args if + returned non NULL. In that case the caller is responsible for destroying + new_args after channel creation. */ +grpc_security_status grpc_channel_credentials_create_security_connector( + grpc_channel_credentials *creds, const char *target, + const grpc_channel_args *args, grpc_channel_security_connector **sc, + grpc_channel_args **new_args); + +/* --- grpc_credentials_md. --- */ + +typedef struct { + gpr_slice key; + gpr_slice value; +} grpc_credentials_md; + +typedef struct { + grpc_credentials_md *entries; + size_t num_entries; + size_t allocated; + gpr_refcount refcount; +} grpc_credentials_md_store; + +grpc_credentials_md_store *grpc_credentials_md_store_create( + size_t initial_capacity); + +/* Will ref key and value. */ +void grpc_credentials_md_store_add(grpc_credentials_md_store *store, + gpr_slice key, gpr_slice value); +void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, + const char *key, const char *value); +grpc_credentials_md_store *grpc_credentials_md_store_ref( + grpc_credentials_md_store *store); +void grpc_credentials_md_store_unref(grpc_credentials_md_store *store); + +/* --- grpc_call_credentials. --- */ + +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); + +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_auth_metadata_context context, + grpc_credentials_metadata_cb cb, + void *user_data); +} grpc_call_credentials_vtable; + +struct grpc_call_credentials { + const grpc_call_credentials_vtable *vtable; + const char *type; + gpr_refcount refcount; +}; + +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_credentials_metadata_cb cb, void *user_data); + +/* 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); + +/* --- grpc_server_credentials. --- */ + +typedef struct { + void (*destruct)(grpc_server_credentials *c); + grpc_security_status (*create_security_connector)( + grpc_server_credentials *c, grpc_server_security_connector **sc); +} grpc_server_credentials_vtable; + +struct grpc_server_credentials { + const grpc_server_credentials_vtable *vtable; + const char *type; + gpr_refcount refcount; + grpc_auth_metadata_processor processor; +}; + +grpc_security_status grpc_server_credentials_create_security_connector( + grpc_server_credentials *creds, grpc_server_security_connector **sc); + +grpc_server_credentials *grpc_server_credentials_ref( + grpc_server_credentials *creds); + +void grpc_server_credentials_unref(grpc_server_credentials *creds); + +#define GRPC_SERVER_CREDENTIALS_ARG "grpc.server_credentials" + +grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials *c); +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); + +/* -- Credentials Metadata Request. -- */ + +typedef struct { + grpc_call_credentials *creds; + grpc_credentials_metadata_cb cb; + void *user_data; +} grpc_credentials_metadata_request; + +grpc_credentials_metadata_request *grpc_credentials_metadata_request_create( + grpc_call_credentials *creds, grpc_credentials_metadata_cb cb, + void *user_data); + +void grpc_credentials_metadata_request_destroy( + grpc_credentials_metadata_request *r); + +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/credentials_metadata.c b/src/core/lib/security/credentials/credentials_metadata.c new file mode 100644 index 0000000000..6a352aab3a --- /dev/null +++ b/src/core/lib/security/credentials/credentials_metadata.c @@ -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. + * + */ + +#include "src/core/lib/security/credentials/credentials.h" + +#include + +#include + +static void store_ensure_capacity(grpc_credentials_md_store *store) { + if (store->num_entries == store->allocated) { + store->allocated = (store->allocated == 0) ? 1 : store->allocated * 2; + store->entries = gpr_realloc( + store->entries, store->allocated * sizeof(grpc_credentials_md)); + } +} + +grpc_credentials_md_store *grpc_credentials_md_store_create( + size_t initial_capacity) { + grpc_credentials_md_store *store = + gpr_malloc(sizeof(grpc_credentials_md_store)); + memset(store, 0, sizeof(grpc_credentials_md_store)); + if (initial_capacity > 0) { + store->entries = gpr_malloc(initial_capacity * sizeof(grpc_credentials_md)); + store->allocated = initial_capacity; + } + gpr_ref_init(&store->refcount, 1); + return store; +} + +void grpc_credentials_md_store_add(grpc_credentials_md_store *store, + gpr_slice key, gpr_slice value) { + if (store == NULL) return; + store_ensure_capacity(store); + store->entries[store->num_entries].key = gpr_slice_ref(key); + store->entries[store->num_entries].value = gpr_slice_ref(value); + store->num_entries++; +} + +void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, + const char *key, + const char *value) { + if (store == NULL) return; + store_ensure_capacity(store); + store->entries[store->num_entries].key = gpr_slice_from_copied_string(key); + store->entries[store->num_entries].value = + gpr_slice_from_copied_string(value); + store->num_entries++; +} + +grpc_credentials_md_store *grpc_credentials_md_store_ref( + grpc_credentials_md_store *store) { + if (store == NULL) return NULL; + gpr_ref(&store->refcount); + return store; +} + +void grpc_credentials_md_store_unref(grpc_credentials_md_store *store) { + if (store == NULL) return; + if (gpr_unref(&store->refcount)) { + if (store->entries != NULL) { + size_t i; + for (i = 0; i < store->num_entries; i++) { + gpr_slice_unref(store->entries[i].key); + gpr_slice_unref(store->entries[i].value); + } + gpr_free(store->entries); + } + gpr_free(store); + } +} 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 0000000000..2a5d225078 --- /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 0000000000..10c2a0b5ce --- /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/google_default/credentials_posix.c b/src/core/lib/security/credentials/google_default/credentials_posix.c new file mode 100644 index 0000000000..42c9d7f997 --- /dev/null +++ b/src/core/lib/security/credentials/google_default/credentials_posix.c @@ -0,0 +1,61 @@ +/* + * + * 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_POSIX_FILE + +#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" + +#include +#include +#include + +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" + +char *grpc_get_well_known_google_credentials_file_path_impl(void) { + char *result = NULL; + char *home = gpr_getenv("HOME"); + if (home == NULL) { + gpr_log(GPR_ERROR, "Could not get HOME environment variable."); + return NULL; + } + gpr_asprintf(&result, "%s/.config/%s/%s", home, + GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY, + GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE); + gpr_free(home); + return result; +} + +#endif /* GPR_POSIX_FILE */ diff --git a/src/core/lib/security/credentials/google_default/credentials_win32.c b/src/core/lib/security/credentials/google_default/credentials_win32.c new file mode 100644 index 0000000000..cd8b48080a --- /dev/null +++ b/src/core/lib/security/credentials/google_default/credentials_win32.c @@ -0,0 +1,61 @@ +/* + * + * 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_WIN32 + +#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" + +#include +#include +#include + +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" + +char *grpc_get_well_known_google_credentials_file_path_impl(void) { + char *result = NULL; + char *appdata_path = gpr_getenv("APPDATA"); + if (appdata_path == NULL) { + gpr_log(GPR_ERROR, "Could not get APPDATA environment variable."); + return NULL; + } + gpr_asprintf(&result, "%s/%s/%s", appdata_path, + GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY, + GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE); + gpr_free(appdata_path); + return result; +} + +#endif /* GPR_WIN32 */ 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 new file mode 100644 index 0000000000..da23bba62b --- /dev/null +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -0,0 +1,268 @@ +/* + * + * 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 +#include + +#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" + +/* -- Constants. -- */ + +#define GRPC_COMPUTE_ENGINE_DETECTION_HOST "metadata.google.internal" + +/* -- Default credentials. -- */ + +static grpc_channel_credentials *default_credentials = NULL; +static int compute_engine_detection_done = 0; +static gpr_mu g_state_mu; +static gpr_mu *g_polling_mu; +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; + int is_done; + int success; +} compute_engine_detector; + +static void on_compute_engine_detection_http_response( + grpc_exec_ctx *exec_ctx, void *user_data, + const grpc_http_response *response) { + compute_engine_detector *detector = (compute_engine_detector *)user_data; + if (response != NULL && response->status == 200 && 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]; + if (strcmp(header->key, "Metadata-Flavor") == 0 && + strcmp(header->value, "Google") == 0) { + detector->success = 1; + break; + } + } + } + gpr_mu_lock(g_polling_mu); + detector->is_done = 1; + grpc_pollset_kick(detector->pollset, NULL); + gpr_mu_unlock(g_polling_mu); +} + +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool s) { + grpc_pollset_destroy(p); +} + +static int is_stack_running_on_compute_engine(void) { + compute_engine_detector detector; + grpc_httpcli_request request; + grpc_httpcli_context context; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_closure destroy_closure; + + /* The http call is local. If it takes more than one sec, it is for sure not + 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.is_done = 0; + detector.success = 0; + + memset(&request, 0, sizeof(grpc_httpcli_request)); + request.host = GRPC_COMPUTE_ENGINE_DETECTION_HOST; + request.http.path = "/"; + + grpc_httpcli_context_init(&context); + + 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_exec_ctx_finish(&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. */ + 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)); + } + 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_exec_ctx_finish(&exec_ctx); + g_polling_mu = NULL; + + gpr_free(detector.pollset); + + return detector.success; +} + +/* Takes ownership of creds_path if not NULL. */ +static grpc_call_credentials *create_default_creds_from_path(char *creds_path) { + grpc_json *json = NULL; + grpc_auth_json_key key; + grpc_auth_refresh_token token; + grpc_call_credentials *result = NULL; + gpr_slice creds_data = gpr_empty_slice(); + int file_ok = 0; + if (creds_path == NULL) goto end; + creds_data = gpr_load_file(creds_path, 0, &file_ok); + if (!file_ok) goto end; + json = grpc_json_parse_string_with_len( + (char *)GPR_SLICE_START_PTR(creds_data), GPR_SLICE_LENGTH(creds_data)); + if (json == NULL) goto end; + + /* First, try an auth json key. */ + key = grpc_auth_json_key_create_from_json(json); + if (grpc_auth_json_key_is_valid(&key)) { + result = + grpc_service_account_jwt_access_credentials_create_from_auth_json_key( + key, grpc_max_auth_token_lifetime()); + goto end; + } + + /* Then try a refresh token if the auth json key was invalid. */ + token = grpc_auth_refresh_token_create_from_json(json); + if (grpc_auth_refresh_token_is_valid(&token)) { + result = + grpc_refresh_token_credentials_create_from_auth_refresh_token(token); + goto end; + } + +end: + if (creds_path != NULL) gpr_free(creds_path); + gpr_slice_unref(creds_data); + if (json != NULL) grpc_json_destroy(json); + return result; +} + +grpc_channel_credentials *grpc_google_default_credentials_create(void) { + grpc_channel_credentials *result = NULL; + grpc_call_credentials *call_creds = NULL; + + GRPC_API_TRACE("grpc_google_default_credentials_create(void)", 0, ()); + + gpr_once_init(&g_once, init_default_credentials); + + gpr_mu_lock(&g_state_mu); + + if (default_credentials != NULL) { + result = grpc_channel_credentials_ref(default_credentials); + goto end; + } + + /* First, try the environment variable. */ + call_creds = create_default_creds_from_path( + gpr_getenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR)); + if (call_creds != NULL) goto end; + + /* Then the well-known file. */ + call_creds = create_default_creds_from_path( + grpc_get_well_known_google_credentials_file_path()); + if (call_creds != NULL) goto end; + + /* At last try to see if we're on compute engine (do the detection only once + since it requires a network test). */ + if (!compute_engine_detection_done) { + int need_compute_engine_creds = is_stack_running_on_compute_engine(); + compute_engine_detection_done = 1; + if (need_compute_engine_creds) { + call_creds = grpc_google_compute_engine_credentials_create(NULL); + } + } + +end: + if (result == NULL) { + if (call_creds != NULL) { + /* Blend with default ssl credentials and add a global reference so that + it + can be cached and re-served. */ + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); + default_credentials = grpc_channel_credentials_ref( + grpc_composite_channel_credentials_create(ssl_creds, call_creds, + NULL)); + GPR_ASSERT(default_credentials != NULL); + grpc_channel_credentials_unref(ssl_creds); + grpc_call_credentials_unref(call_creds); + result = default_credentials; + } else { + gpr_log(GPR_ERROR, "Could not create google default credentials."); + } + } + gpr_mu_unlock(&g_state_mu); + return result; +} + +void grpc_flush_cached_google_default_credentials(void) { + gpr_once_init(&g_once, init_default_credentials); + gpr_mu_lock(&g_state_mu); + if (default_credentials != NULL) { + grpc_channel_credentials_unref(default_credentials); + default_credentials = NULL; + } + compute_engine_detection_done = 0; + gpr_mu_unlock(&g_state_mu); +} + +/* -- Well known credentials path. -- */ + +static grpc_well_known_credentials_path_getter creds_path_getter = NULL; + +char *grpc_get_well_known_google_credentials_file_path(void) { + if (creds_path_getter != NULL) return creds_path_getter(); + return grpc_get_well_known_google_credentials_file_path_impl(); +} + +void grpc_override_well_known_credentials_path_getter( + grpc_well_known_credentials_path_getter getter) { + creds_path_getter = getter; +} 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 0000000000..33e8c2ec8d --- /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 0000000000..ec0f2841f2 --- /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 0000000000..7110eaf478 --- /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/credentials/jwt/json_token.c b/src/core/lib/security/credentials/jwt/json_token.c new file mode 100644 index 0000000000..fd3d0d6a64 --- /dev/null +++ b/src/core/lib/security/credentials/jwt/json_token.c @@ -0,0 +1,321 @@ +/* + * + * 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/jwt/json_token.h" + +#include + +#include +#include +#include + +#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 +#include +#include + +/* --- Constants. --- */ + +/* 1 hour max. */ +gpr_timespec grpc_max_auth_token_lifetime() { + gpr_timespec out; + out.tv_sec = 3600; + out.tv_nsec = 0; + out.clock_type = GPR_TIMESPAN; + return out; +} + +#define GRPC_JWT_RSA_SHA256_ALGORITHM "RS256" +#define GRPC_JWT_TYPE "JWT" + +/* --- Override for testing. --- */ + +static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override = NULL; + +/* --- grpc_auth_json_key. --- */ + +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); +} + +grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json *json) { + grpc_auth_json_key result; + BIO *bio = NULL; + const char *prop_value; + int success = 0; + + memset(&result, 0, sizeof(grpc_auth_json_key)); + 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_SERVICE_ACCOUNT)) { + goto end; + } + result.type = GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT; + + 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 = grpc_json_get_string_property(json, "private_key"); + if (prop_value == NULL) { + goto end; + } + bio = BIO_new(BIO_s_mem()); + success = BIO_puts(bio, prop_value); + if ((success < 0) || ((size_t)success != strlen(prop_value))) { + gpr_log(GPR_ERROR, "Could not write into openssl BIO."); + goto end; + } + result.private_key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, ""); + if (result.private_key == NULL) { + gpr_log(GPR_ERROR, "Could not deserialize private key."); + goto end; + } + success = 1; + +end: + if (bio != NULL) BIO_free(bio); + if (!success) grpc_auth_json_key_destruct(&result); + return result; +} + +grpc_auth_json_key grpc_auth_json_key_create_from_string( + const char *json_string) { + char *scratchpad = gpr_strdup(json_string); + grpc_json *json = grpc_json_parse_string(scratchpad); + grpc_auth_json_key result = grpc_auth_json_key_create_from_json(json); + if (json != NULL) grpc_json_destroy(json); + gpr_free(scratchpad); + return result; +} + +void grpc_auth_json_key_destruct(grpc_auth_json_key *json_key) { + if (json_key == NULL) return; + json_key->type = GRPC_AUTH_JSON_TYPE_INVALID; + if (json_key->client_id != NULL) { + gpr_free(json_key->client_id); + json_key->client_id = NULL; + } + if (json_key->private_key_id != NULL) { + gpr_free(json_key->private_key_id); + json_key->private_key_id = NULL; + } + if (json_key->client_email != NULL) { + gpr_free(json_key->client_email); + json_key->client_email = NULL; + } + if (json_key->private_key != NULL) { + RSA_free(json_key->private_key); + json_key->private_key = NULL; + } +} + +/* --- jwt encoding and signature. --- */ + +static grpc_json *create_child(grpc_json *brother, grpc_json *parent, + const char *key, const char *value, + grpc_json_type type) { + grpc_json *child = grpc_json_create(type); + if (brother) brother->next = child; + if (!parent->child) parent->child = child; + child->parent = parent; + child->value = value; + child->key = key; + return child; +} + +static char *encoded_jwt_header(const char *key_id, const char *algorithm) { + grpc_json *json = grpc_json_create(GRPC_JSON_OBJECT); + grpc_json *child = NULL; + char *json_str = NULL; + char *result = NULL; + + child = create_child(NULL, json, "alg", algorithm, GRPC_JSON_STRING); + child = create_child(child, json, "typ", GRPC_JWT_TYPE, GRPC_JSON_STRING); + create_child(child, json, "kid", key_id, GRPC_JSON_STRING); + + json_str = grpc_json_dump_to_string(json, 0); + result = grpc_base64_encode(json_str, strlen(json_str), 1, 0); + gpr_free(json_str); + grpc_json_destroy(json); + return result; +} + +static char *encoded_jwt_claim(const grpc_auth_json_key *json_key, + const char *audience, + gpr_timespec token_lifetime, const char *scope) { + grpc_json *json = grpc_json_create(GRPC_JSON_OBJECT); + grpc_json *child = NULL; + char *json_str = NULL; + char *result = NULL; + gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); + gpr_timespec expiration = gpr_time_add(now, token_lifetime); + char now_str[GPR_LTOA_MIN_BUFSIZE]; + char expiration_str[GPR_LTOA_MIN_BUFSIZE]; + if (gpr_time_cmp(token_lifetime, grpc_max_auth_token_lifetime()) > 0) { + gpr_log(GPR_INFO, "Cropping token lifetime to maximum allowed value."); + expiration = gpr_time_add(now, grpc_max_auth_token_lifetime()); + } + int64_ttoa(now.tv_sec, now_str); + int64_ttoa(expiration.tv_sec, expiration_str); + + child = + create_child(NULL, json, "iss", json_key->client_email, GRPC_JSON_STRING); + if (scope != NULL) { + child = create_child(child, json, "scope", scope, GRPC_JSON_STRING); + } else { + /* Unscoped JWTs need a sub field. */ + child = create_child(child, json, "sub", json_key->client_email, + GRPC_JSON_STRING); + } + + child = create_child(child, json, "aud", audience, GRPC_JSON_STRING); + child = create_child(child, json, "iat", now_str, GRPC_JSON_NUMBER); + create_child(child, json, "exp", expiration_str, GRPC_JSON_NUMBER); + + json_str = grpc_json_dump_to_string(json, 0); + result = grpc_base64_encode(json_str, strlen(json_str), 1, 0); + gpr_free(json_str); + grpc_json_destroy(json); + return result; +} + +static char *dot_concat_and_free_strings(char *str1, char *str2) { + size_t str1_len = strlen(str1); + size_t str2_len = strlen(str2); + size_t result_len = str1_len + 1 /* dot */ + str2_len; + char *result = gpr_malloc(result_len + 1 /* NULL terminated */); + char *current = result; + memcpy(current, str1, str1_len); + current += str1_len; + *(current++) = '.'; + memcpy(current, str2, str2_len); + current += str2_len; + GPR_ASSERT(current >= result); + GPR_ASSERT((uintptr_t)(current - result) == result_len); + *current = '\0'; + gpr_free(str1); + gpr_free(str2); + return result; +} + +const EVP_MD *openssl_digest_from_algorithm(const char *algorithm) { + if (strcmp(algorithm, GRPC_JWT_RSA_SHA256_ALGORITHM) == 0) { + return EVP_sha256(); + } else { + gpr_log(GPR_ERROR, "Unknown algorithm %s.", algorithm); + return NULL; + } +} + +char *compute_and_encode_signature(const grpc_auth_json_key *json_key, + const char *signature_algorithm, + const char *to_sign) { + const EVP_MD *md = openssl_digest_from_algorithm(signature_algorithm); + EVP_MD_CTX *md_ctx = NULL; + EVP_PKEY *key = EVP_PKEY_new(); + size_t sig_len = 0; + unsigned char *sig = NULL; + char *result = NULL; + if (md == NULL) return NULL; + md_ctx = EVP_MD_CTX_create(); + if (md_ctx == NULL) { + gpr_log(GPR_ERROR, "Could not create MD_CTX"); + goto end; + } + EVP_PKEY_set1_RSA(key, json_key->private_key); + if (EVP_DigestSignInit(md_ctx, NULL, md, NULL, key) != 1) { + gpr_log(GPR_ERROR, "DigestInit failed."); + goto end; + } + if (EVP_DigestSignUpdate(md_ctx, to_sign, strlen(to_sign)) != 1) { + gpr_log(GPR_ERROR, "DigestUpdate failed."); + goto end; + } + if (EVP_DigestSignFinal(md_ctx, NULL, &sig_len) != 1) { + gpr_log(GPR_ERROR, "DigestFinal (get signature length) failed."); + goto end; + } + sig = gpr_malloc(sig_len); + if (EVP_DigestSignFinal(md_ctx, sig, &sig_len) != 1) { + gpr_log(GPR_ERROR, "DigestFinal (signature compute) failed."); + goto end; + } + result = grpc_base64_encode(sig, sig_len, 1, 0); + +end: + if (key != NULL) EVP_PKEY_free(key); + if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx); + if (sig != NULL) gpr_free(sig); + return result; +} + +char *grpc_jwt_encode_and_sign(const grpc_auth_json_key *json_key, + const char *audience, + gpr_timespec token_lifetime, const char *scope) { + if (g_jwt_encode_and_sign_override != NULL) { + return g_jwt_encode_and_sign_override(json_key, audience, token_lifetime, + scope); + } else { + const char *sig_algo = GRPC_JWT_RSA_SHA256_ALGORITHM; + char *to_sign = dot_concat_and_free_strings( + encoded_jwt_header(json_key->private_key_id, sig_algo), + encoded_jwt_claim(json_key, audience, token_lifetime, scope)); + char *sig = compute_and_encode_signature(json_key, sig_algo, to_sign); + if (sig == NULL) { + gpr_free(to_sign); + return NULL; + } + return dot_concat_and_free_strings(to_sign, sig); + } +} + +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/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h new file mode 100644 index 0000000000..07fc5bf0e0 --- /dev/null +++ b/src/core/lib/security/credentials/jwt/json_token.h @@ -0,0 +1,88 @@ +/* + * + * 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_JWT_JSON_TOKEN_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H + +#include +#include + +#include "src/core/lib/json/json.h" + +/* --- Constants. --- */ + +#define GRPC_JWT_OAUTH2_AUDIENCE "https://www.googleapis.com/oauth2/v3/token" + +/* --- auth_json_key parsing. --- */ + +typedef struct { + const char *type; + char *private_key_id; + char *client_id; + char *client_email; + RSA *private_key; +} grpc_auth_json_key; + +/* Returns 1 if the object is valid, 0 otherwise. */ +int grpc_auth_json_key_is_valid(const grpc_auth_json_key *json_key); + +/* Creates a json_key object from string. Returns an invalid object if a parsing + error has been encountered. */ +grpc_auth_json_key grpc_auth_json_key_create_from_string( + const char *json_string); + +/* Creates a json_key object from parsed json. Returns an invalid object if a + parsing error has been encountered. */ +grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json *json); + +/* Destructs the object. */ +void grpc_auth_json_key_destruct(grpc_auth_json_key *json_key); + +/* --- json token encoding and signing. --- */ + +/* Caller is responsible for calling gpr_free on the returned value. May return + NULL on invalid input. The scope parameter may be NULL. */ +char *grpc_jwt_encode_and_sign(const grpc_auth_json_key *json_key, + const char *audience, + gpr_timespec token_lifetime, const char *scope); + +/* Override encode_and_sign function for testing. */ +typedef char *(*grpc_jwt_encode_and_sign_override)( + const grpc_auth_json_key *json_key, const char *audience, + gpr_timespec token_lifetime, const char *scope); + +/* Set a custom encode_and_sign override for testing. */ +void grpc_jwt_encode_and_sign_set_override( + grpc_jwt_encode_and_sign_override func); + +#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 0000000000..9fd0527a52 --- /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 0000000000..6faf676414 --- /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/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c new file mode 100644 index 0000000000..cd6c7ce392 --- /dev/null +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -0,0 +1,843 @@ +/* + * + * 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/jwt/jwt_verifier.h" + +#include +#include + +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/security/util/b64.h" +#include "src/core/lib/tsi/ssl_types.h" + +#include +#include +#include +#include +#include + +/* --- Utils. --- */ + +const char *grpc_jwt_verifier_status_to_string( + grpc_jwt_verifier_status status) { + switch (status) { + case GRPC_JWT_VERIFIER_OK: + return "OK"; + case GRPC_JWT_VERIFIER_BAD_SIGNATURE: + return "BAD_SIGNATURE"; + case GRPC_JWT_VERIFIER_BAD_FORMAT: + return "BAD_FORMAT"; + case GRPC_JWT_VERIFIER_BAD_AUDIENCE: + return "BAD_AUDIENCE"; + case GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR: + return "KEY_RETRIEVAL_ERROR"; + case GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE: + return "TIME_CONSTRAINT_FAILURE"; + case GRPC_JWT_VERIFIER_GENERIC_ERROR: + return "GENERIC_ERROR"; + default: + return "UNKNOWN"; + } +} + +static const EVP_MD *evp_md_from_alg(const char *alg) { + if (strcmp(alg, "RS256") == 0) { + return EVP_sha256(); + } else if (strcmp(alg, "RS384") == 0) { + return EVP_sha384(); + } else if (strcmp(alg, "RS512") == 0) { + return EVP_sha512(); + } else { + return NULL; + } +} + +static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, + gpr_slice *buffer) { + grpc_json *json; + + *buffer = grpc_base64_decode_with_len(str, len, 1); + if (GPR_SLICE_IS_EMPTY(*buffer)) { + gpr_log(GPR_ERROR, "Invalid base64."); + return NULL; + } + json = grpc_json_parse_string_with_len((char *)GPR_SLICE_START_PTR(*buffer), + GPR_SLICE_LENGTH(*buffer)); + if (json == NULL) { + gpr_slice_unref(*buffer); + gpr_log(GPR_ERROR, "JSON parsing error."); + } + return json; +} + +static const char *validate_string_field(const grpc_json *json, + const char *key) { + if (json->type != GRPC_JSON_STRING) { + gpr_log(GPR_ERROR, "Invalid %s field [%s]", key, json->value); + return NULL; + } + return json->value; +} + +static gpr_timespec validate_time_field(const grpc_json *json, + const char *key) { + gpr_timespec result = gpr_time_0(GPR_CLOCK_REALTIME); + if (json->type != GRPC_JSON_NUMBER) { + gpr_log(GPR_ERROR, "Invalid %s field [%s]", key, json->value); + return result; + } + result.tv_sec = strtol(json->value, NULL, 10); + return result; +} + +/* --- JOSE header. see http://tools.ietf.org/html/rfc7515#section-4 --- */ + +typedef struct { + const char *alg; + const char *kid; + const char *typ; + /* TODO(jboeuf): Add others as needed (jku, jwk, x5u, x5c and so on...). */ + gpr_slice buffer; +} jose_header; + +static void jose_header_destroy(jose_header *h) { + gpr_slice_unref(h->buffer); + gpr_free(h); +} + +/* Takes ownership of json and buffer. */ +static jose_header *jose_header_from_json(grpc_json *json, gpr_slice buffer) { + grpc_json *cur; + jose_header *h = gpr_malloc(sizeof(jose_header)); + memset(h, 0, sizeof(jose_header)); + h->buffer = buffer; + for (cur = json->child; cur != NULL; cur = cur->next) { + if (strcmp(cur->key, "alg") == 0) { + /* We only support RSA-1.5 signatures for now. + Beware of this if we add HMAC support: + https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/ + */ + if (cur->type != GRPC_JSON_STRING || strncmp(cur->value, "RS", 2) || + evp_md_from_alg(cur->value) == NULL) { + gpr_log(GPR_ERROR, "Invalid alg field [%s]", cur->value); + goto error; + } + h->alg = cur->value; + } else if (strcmp(cur->key, "typ") == 0) { + h->typ = validate_string_field(cur, "typ"); + if (h->typ == NULL) goto error; + } else if (strcmp(cur->key, "kid") == 0) { + h->kid = validate_string_field(cur, "kid"); + if (h->kid == NULL) goto error; + } + } + if (h->alg == NULL) { + gpr_log(GPR_ERROR, "Missing alg field."); + goto error; + } + grpc_json_destroy(json); + h->buffer = buffer; + return h; + +error: + grpc_json_destroy(json); + jose_header_destroy(h); + return NULL; +} + +/* --- JWT claims. see http://tools.ietf.org/html/rfc7519#section-4.1 */ + +struct grpc_jwt_claims { + /* Well known properties already parsed. */ + const char *sub; + const char *iss; + const char *aud; + const char *jti; + gpr_timespec iat; + gpr_timespec exp; + gpr_timespec nbf; + + grpc_json *json; + gpr_slice buffer; +}; + +void grpc_jwt_claims_destroy(grpc_jwt_claims *claims) { + grpc_json_destroy(claims->json); + gpr_slice_unref(claims->buffer); + gpr_free(claims); +} + +const grpc_json *grpc_jwt_claims_json(const grpc_jwt_claims *claims) { + if (claims == NULL) return NULL; + return claims->json; +} + +const char *grpc_jwt_claims_subject(const grpc_jwt_claims *claims) { + if (claims == NULL) return NULL; + return claims->sub; +} + +const char *grpc_jwt_claims_issuer(const grpc_jwt_claims *claims) { + if (claims == NULL) return NULL; + return claims->iss; +} + +const char *grpc_jwt_claims_id(const grpc_jwt_claims *claims) { + if (claims == NULL) return NULL; + return claims->jti; +} + +const char *grpc_jwt_claims_audience(const grpc_jwt_claims *claims) { + if (claims == NULL) return NULL; + return claims->aud; +} + +gpr_timespec grpc_jwt_claims_issued_at(const grpc_jwt_claims *claims) { + if (claims == NULL) return gpr_inf_past(GPR_CLOCK_REALTIME); + return claims->iat; +} + +gpr_timespec grpc_jwt_claims_expires_at(const grpc_jwt_claims *claims) { + if (claims == NULL) return gpr_inf_future(GPR_CLOCK_REALTIME); + return claims->exp; +} + +gpr_timespec grpc_jwt_claims_not_before(const grpc_jwt_claims *claims) { + if (claims == NULL) return gpr_inf_past(GPR_CLOCK_REALTIME); + return claims->nbf; +} + +/* Takes ownership of json and buffer even in case of failure. */ +grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer) { + grpc_json *cur; + grpc_jwt_claims *claims = gpr_malloc(sizeof(grpc_jwt_claims)); + memset(claims, 0, sizeof(grpc_jwt_claims)); + claims->json = json; + claims->buffer = buffer; + claims->iat = gpr_inf_past(GPR_CLOCK_REALTIME); + claims->nbf = gpr_inf_past(GPR_CLOCK_REALTIME); + claims->exp = gpr_inf_future(GPR_CLOCK_REALTIME); + + /* Per the spec, all fields are optional. */ + for (cur = json->child; cur != NULL; cur = cur->next) { + if (strcmp(cur->key, "sub") == 0) { + claims->sub = validate_string_field(cur, "sub"); + if (claims->sub == NULL) goto error; + } else if (strcmp(cur->key, "iss") == 0) { + claims->iss = validate_string_field(cur, "iss"); + if (claims->iss == NULL) goto error; + } else if (strcmp(cur->key, "aud") == 0) { + claims->aud = validate_string_field(cur, "aud"); + if (claims->aud == NULL) goto error; + } else if (strcmp(cur->key, "jti") == 0) { + claims->jti = validate_string_field(cur, "jti"); + if (claims->jti == NULL) goto error; + } else if (strcmp(cur->key, "iat") == 0) { + claims->iat = validate_time_field(cur, "iat"); + if (gpr_time_cmp(claims->iat, gpr_time_0(GPR_CLOCK_REALTIME)) == 0) + goto error; + } else if (strcmp(cur->key, "exp") == 0) { + claims->exp = validate_time_field(cur, "exp"); + if (gpr_time_cmp(claims->exp, gpr_time_0(GPR_CLOCK_REALTIME)) == 0) + goto error; + } else if (strcmp(cur->key, "nbf") == 0) { + claims->nbf = validate_time_field(cur, "nbf"); + if (gpr_time_cmp(claims->nbf, gpr_time_0(GPR_CLOCK_REALTIME)) == 0) + goto error; + } + } + return claims; + +error: + grpc_jwt_claims_destroy(claims); + return NULL; +} + +grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, + const char *audience) { + gpr_timespec skewed_now; + int audience_ok; + + GPR_ASSERT(claims != NULL); + + skewed_now = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_clock_skew); + if (gpr_time_cmp(skewed_now, claims->nbf) < 0) { + gpr_log(GPR_ERROR, "JWT is not valid yet."); + return GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE; + } + skewed_now = + gpr_time_sub(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_clock_skew); + if (gpr_time_cmp(skewed_now, claims->exp) > 0) { + gpr_log(GPR_ERROR, "JWT is expired."); + return GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE; + } + + if (audience == NULL) { + audience_ok = claims->aud == NULL; + } else { + audience_ok = claims->aud != NULL && strcmp(audience, claims->aud) == 0; + } + if (!audience_ok) { + gpr_log(GPR_ERROR, "Audience mismatch: expected %s and found %s.", + audience == NULL ? "NULL" : audience, + claims->aud == NULL ? "NULL" : claims->aud); + return GRPC_JWT_VERIFIER_BAD_AUDIENCE; + } + return GRPC_JWT_VERIFIER_OK; +} + +/* --- verifier_cb_ctx object. --- */ + +typedef struct { + grpc_jwt_verifier *verifier; + grpc_pollset *pollset; + jose_header *header; + grpc_jwt_claims *claims; + char *audience; + gpr_slice signature; + gpr_slice signed_data; + void *user_data; + grpc_jwt_verification_done_cb user_cb; +} verifier_cb_ctx; + +/* Takes ownership of the header, claims and signature. */ +static verifier_cb_ctx *verifier_cb_ctx_create( + grpc_jwt_verifier *verifier, grpc_pollset *pollset, jose_header *header, + 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) { + verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx)); + memset(ctx, 0, sizeof(verifier_cb_ctx)); + ctx->verifier = verifier; + ctx->pollset = pollset; + ctx->header = header; + ctx->audience = gpr_strdup(audience); + ctx->claims = claims; + ctx->signature = signature; + ctx->signed_data = gpr_slice_from_copied_buffer(signed_jwt, signed_jwt_len); + ctx->user_data = user_data; + ctx->user_cb = cb; + return ctx; +} + +void verifier_cb_ctx_destroy(verifier_cb_ctx *ctx) { + if (ctx->audience != NULL) gpr_free(ctx->audience); + if (ctx->claims != NULL) grpc_jwt_claims_destroy(ctx->claims); + gpr_slice_unref(ctx->signature); + gpr_slice_unref(ctx->signed_data); + jose_header_destroy(ctx->header); + /* TODO: see what to do with claims... */ + gpr_free(ctx); +} + +/* --- grpc_jwt_verifier object. --- */ + +/* Clock skew defaults to one minute. */ +gpr_timespec grpc_jwt_verifier_clock_skew = {60, 0, GPR_TIMESPAN}; + +/* Max delay defaults to one minute. */ +gpr_timespec grpc_jwt_verifier_max_delay = {60, 0, GPR_TIMESPAN}; + +typedef struct { + char *email_domain; + char *key_url_prefix; +} email_key_mapping; + +struct grpc_jwt_verifier { + email_key_mapping *mappings; + size_t num_mappings; /* Should be very few, linear search ok. */ + size_t allocated_mappings; + grpc_httpcli_context http_ctx; +}; + +static grpc_json *json_from_http(const grpc_httpcli_response *response) { + grpc_json *json = NULL; + + if (response == NULL) { + gpr_log(GPR_ERROR, "HTTP response is NULL."); + return NULL; + } + if (response->status != 200) { + gpr_log(GPR_ERROR, "Call to http server failed with error %d.", + response->status); + return NULL; + } + + json = grpc_json_parse_string_with_len(response->body, response->body_length); + if (json == NULL) { + gpr_log(GPR_ERROR, "Invalid JSON found in response."); + } + return json; +} + +static const grpc_json *find_property_by_name(const grpc_json *json, + const char *name) { + const grpc_json *cur; + for (cur = json->child; cur != NULL; cur = cur->next) { + if (strcmp(cur->key, name) == 0) return cur; + } + return NULL; +} + +static EVP_PKEY *extract_pkey_from_x509(const char *x509_str) { + X509 *x509 = NULL; + EVP_PKEY *result = NULL; + BIO *bio = BIO_new(BIO_s_mem()); + size_t len = strlen(x509_str); + GPR_ASSERT(len < INT_MAX); + BIO_write(bio, x509_str, (int)len); + x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL); + if (x509 == NULL) { + gpr_log(GPR_ERROR, "Unable to parse x509 cert."); + goto end; + } + result = X509_get_pubkey(x509); + if (result == NULL) { + gpr_log(GPR_ERROR, "Cannot find public key in X509 cert."); + } + +end: + BIO_free(bio); + if (x509 != NULL) X509_free(x509); + return result; +} + +static BIGNUM *bignum_from_base64(const char *b64) { + BIGNUM *result = NULL; + gpr_slice bin; + + if (b64 == NULL) return NULL; + bin = grpc_base64_decode(b64, 1); + if (GPR_SLICE_IS_EMPTY(bin)) { + gpr_log(GPR_ERROR, "Invalid base64 for big num."); + return NULL; + } + result = BN_bin2bn(GPR_SLICE_START_PTR(bin), + TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL); + gpr_slice_unref(bin); + return result; +} + +static EVP_PKEY *pkey_from_jwk(const grpc_json *json, const char *kty) { + const grpc_json *key_prop; + RSA *rsa = NULL; + EVP_PKEY *result = NULL; + + GPR_ASSERT(kty != NULL && json != NULL); + if (strcmp(kty, "RSA") != 0) { + gpr_log(GPR_ERROR, "Unsupported key type %s.", kty); + goto end; + } + rsa = RSA_new(); + if (rsa == NULL) { + gpr_log(GPR_ERROR, "Could not create rsa key."); + goto end; + } + for (key_prop = json->child; key_prop != NULL; key_prop = key_prop->next) { + if (strcmp(key_prop->key, "n") == 0) { + rsa->n = bignum_from_base64(validate_string_field(key_prop, "n")); + if (rsa->n == NULL) goto end; + } else if (strcmp(key_prop->key, "e") == 0) { + rsa->e = bignum_from_base64(validate_string_field(key_prop, "e")); + if (rsa->e == NULL) goto end; + } + } + if (rsa->e == NULL || rsa->n == NULL) { + gpr_log(GPR_ERROR, "Missing RSA public key field."); + goto end; + } + result = EVP_PKEY_new(); + EVP_PKEY_set1_RSA(result, rsa); /* uprefs rsa. */ + +end: + if (rsa != NULL) RSA_free(rsa); + return result; +} + +static EVP_PKEY *find_verification_key(const grpc_json *json, + const char *header_alg, + const char *header_kid) { + const grpc_json *jkey; + const grpc_json *jwk_keys; + /* Try to parse the json as a JWK set: + https://tools.ietf.org/html/rfc7517#section-5. */ + jwk_keys = find_property_by_name(json, "keys"); + if (jwk_keys == NULL) { + /* Use the google proprietary format which is: + { : , : , ... } */ + const grpc_json *cur = find_property_by_name(json, header_kid); + if (cur == NULL) return NULL; + return extract_pkey_from_x509(cur->value); + } + + if (jwk_keys->type != GRPC_JSON_ARRAY) { + gpr_log(GPR_ERROR, + "Unexpected value type of keys property in jwks key set."); + return NULL; + } + /* Key format is specified in: + https://tools.ietf.org/html/rfc7518#section-6. */ + for (jkey = jwk_keys->child; jkey != NULL; jkey = jkey->next) { + grpc_json *key_prop; + const char *alg = NULL; + const char *kid = NULL; + const char *kty = NULL; + + if (jkey->type != GRPC_JSON_OBJECT) continue; + for (key_prop = jkey->child; key_prop != NULL; key_prop = key_prop->next) { + if (strcmp(key_prop->key, "alg") == 0 && + key_prop->type == GRPC_JSON_STRING) { + alg = key_prop->value; + } else if (strcmp(key_prop->key, "kid") == 0 && + key_prop->type == GRPC_JSON_STRING) { + kid = key_prop->value; + } else if (strcmp(key_prop->key, "kty") == 0 && + key_prop->type == GRPC_JSON_STRING) { + kty = key_prop->value; + } + } + if (alg != NULL && kid != NULL && kty != NULL && + strcmp(kid, header_kid) == 0 && strcmp(alg, header_alg) == 0) { + return pkey_from_jwk(jkey, kty); + } + } + gpr_log(GPR_ERROR, + "Could not find matching key in key set for kid=%s and alg=%s", + header_kid, header_alg); + return NULL; +} + +static int verify_jwt_signature(EVP_PKEY *key, const char *alg, + gpr_slice signature, gpr_slice signed_data) { + EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); + const EVP_MD *md = evp_md_from_alg(alg); + int result = 0; + + GPR_ASSERT(md != NULL); /* Checked before. */ + if (md_ctx == NULL) { + gpr_log(GPR_ERROR, "Could not create EVP_MD_CTX."); + goto end; + } + if (EVP_DigestVerifyInit(md_ctx, NULL, md, NULL, key) != 1) { + gpr_log(GPR_ERROR, "EVP_DigestVerifyInit failed."); + goto end; + } + if (EVP_DigestVerifyUpdate(md_ctx, GPR_SLICE_START_PTR(signed_data), + GPR_SLICE_LENGTH(signed_data)) != 1) { + gpr_log(GPR_ERROR, "EVP_DigestVerifyUpdate failed."); + goto end; + } + if (EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(signature), + GPR_SLICE_LENGTH(signature)) != 1) { + gpr_log(GPR_ERROR, "JWT signature verification failed."); + goto end; + } + result = 1; + +end: + if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx); + return result; +} + +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); + verifier_cb_ctx *ctx = (verifier_cb_ctx *)user_data; + EVP_PKEY *verification_key = NULL; + grpc_jwt_verifier_status status = GRPC_JWT_VERIFIER_GENERIC_ERROR; + grpc_jwt_claims *claims = NULL; + + if (json == NULL) { + status = GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR; + goto end; + } + verification_key = + find_verification_key(json, ctx->header->alg, ctx->header->kid); + if (verification_key == NULL) { + gpr_log(GPR_ERROR, "Could not find verification key with kid %s.", + ctx->header->kid); + status = GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR; + goto end; + } + + if (!verify_jwt_signature(verification_key, ctx->header->alg, ctx->signature, + ctx->signed_data)) { + status = GRPC_JWT_VERIFIER_BAD_SIGNATURE; + goto end; + } + + status = grpc_jwt_claims_check(ctx->claims, ctx->audience); + if (status == GRPC_JWT_VERIFIER_OK) { + /* Pass ownership. */ + claims = ctx->claims; + ctx->claims = NULL; + } + +end: + if (json != NULL) grpc_json_destroy(json); + if (verification_key != NULL) EVP_PKEY_free(verification_key); + ctx->user_cb(ctx->user_data, status, claims); + verifier_cb_ctx_destroy(ctx); +} + +static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, + const grpc_httpcli_response *response) { + const grpc_json *cur; + grpc_json *json = json_from_http(response); + verifier_cb_ctx *ctx = (verifier_cb_ctx *)user_data; + grpc_httpcli_request req; + const char *jwks_uri; + + /* TODO(jboeuf): Cache the jwks_uri in order to avoid this hop next time. */ + if (json == NULL) goto error; + cur = find_property_by_name(json, "jwks_uri"); + if (cur == NULL) { + gpr_log(GPR_ERROR, "Could not find jwks_uri in openid config."); + goto error; + } + jwks_uri = validate_string_field(cur, "jwks_uri"); + if (jwks_uri == NULL) goto error; + if (strstr(jwks_uri, "https://") != jwks_uri) { + gpr_log(GPR_ERROR, "Invalid non https jwks_uri: %s.", jwks_uri); + goto error; + } + jwks_uri += 8; + req.handshaker = &grpc_httpcli_ssl; + req.host = gpr_strdup(jwks_uri); + req.http.path = strchr(jwks_uri, '/'); + if (req.http.path == NULL) { + req.http.path = ""; + } else { + *(req.host + (req.http.path - jwks_uri)) = '\0'; + } + 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_json_destroy(json); + gpr_free(req.host); + return; + +error: + if (json != NULL) grpc_json_destroy(json); + ctx->user_cb(ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, NULL); + verifier_cb_ctx_destroy(ctx); +} + +static email_key_mapping *verifier_get_mapping(grpc_jwt_verifier *v, + const char *email_domain) { + size_t i; + if (v->mappings == NULL) return NULL; + for (i = 0; i < v->num_mappings; i++) { + if (strcmp(email_domain, v->mappings[i].email_domain) == 0) { + return &v->mappings[i]; + } + } + return NULL; +} + +static void verifier_put_mapping(grpc_jwt_verifier *v, const char *email_domain, + const char *key_url_prefix) { + email_key_mapping *mapping = verifier_get_mapping(v, email_domain); + GPR_ASSERT(v->num_mappings < v->allocated_mappings); + if (mapping != NULL) { + gpr_free(mapping->key_url_prefix); + mapping->key_url_prefix = gpr_strdup(key_url_prefix); + return; + } + v->mappings[v->num_mappings].email_domain = gpr_strdup(email_domain); + v->mappings[v->num_mappings].key_url_prefix = gpr_strdup(key_url_prefix); + v->num_mappings++; + GPR_ASSERT(v->num_mappings <= v->allocated_mappings); +} + +/* Takes ownership of ctx. */ +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; + char *path_prefix = NULL; + const char *iss; + grpc_httpcli_request req; + memset(&req, 0, sizeof(grpc_httpcli_request)); + req.handshaker = &grpc_httpcli_ssl; + + GPR_ASSERT(ctx != NULL && ctx->header != NULL && ctx->claims != NULL); + iss = ctx->claims->iss; + if (ctx->header->kid == NULL) { + gpr_log(GPR_ERROR, "Missing kid in jose header."); + goto error; + } + if (iss == NULL) { + gpr_log(GPR_ERROR, "Missing iss in claims."); + goto error; + } + + /* This code relies on: + https://openid.net/specs/openid-connect-discovery-1_0.html + Nobody seems to implement the account/email/webfinger part 2. of the spec + so we will rely instead on email/url mappings if we detect such an issuer. + Part 4, on the other hand is implemented by both google and salesforce. */ + + /* Very non-sophisticated way to detect an email address. Should be good + enough for now... */ + at_sign = strchr(iss, '@'); + if (at_sign != NULL) { + email_key_mapping *mapping; + const char *email_domain = at_sign + 1; + GPR_ASSERT(ctx->verifier != NULL); + mapping = verifier_get_mapping(ctx->verifier, email_domain); + if (mapping == NULL) { + gpr_log(GPR_ERROR, "Missing mapping for issuer email."); + goto error; + } + req.host = gpr_strdup(mapping->key_url_prefix); + path_prefix = strchr(req.host, '/'); + if (path_prefix == NULL) { + gpr_asprintf(&req.http.path, "/%s", iss); + } else { + *(path_prefix++) = '\0'; + gpr_asprintf(&req.http.path, "/%s/%s", path_prefix, iss); + } + http_cb = on_keys_retrieved; + } else { + req.host = gpr_strdup(strstr(iss, "https://") == iss ? iss + 8 : iss); + path_prefix = strchr(req.host, '/'); + if (path_prefix == NULL) { + req.http.path = gpr_strdup(GRPC_OPENID_CONFIG_URL_SUFFIX); + } else { + *(path_prefix++) = 0; + gpr_asprintf(&req.http.path, "/%s%s", path_prefix, + GRPC_OPENID_CONFIG_URL_SUFFIX); + } + http_cb = on_openid_config_retrieved; + } + + 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); + gpr_free(req.host); + gpr_free(req.http.path); + return; + +error: + ctx->user_cb(ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, NULL); + verifier_cb_ctx_destroy(ctx); +} + +void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, + grpc_jwt_verifier *verifier, + grpc_pollset *pollset, const char *jwt, + const char *audience, + grpc_jwt_verification_done_cb cb, + void *user_data) { + const char *dot = NULL; + grpc_json *json; + jose_header *header = NULL; + grpc_jwt_claims *claims = NULL; + gpr_slice header_buffer; + gpr_slice claims_buffer; + gpr_slice signature; + size_t signed_jwt_len; + const char *cur = jwt; + + GPR_ASSERT(verifier != NULL && jwt != NULL && audience != NULL && cb != NULL); + dot = strchr(cur, '.'); + if (dot == NULL) goto error; + json = parse_json_part_from_jwt(cur, (size_t)(dot - cur), &header_buffer); + if (json == NULL) goto error; + header = jose_header_from_json(json, header_buffer); + if (header == NULL) goto error; + + cur = dot + 1; + dot = strchr(cur, '.'); + if (dot == NULL) goto error; + json = parse_json_part_from_jwt(cur, (size_t)(dot - cur), &claims_buffer); + if (json == NULL) goto error; + claims = grpc_jwt_claims_from_json(json, claims_buffer); + if (claims == NULL) goto error; + + signed_jwt_len = (size_t)(dot - jwt); + cur = dot + 1; + signature = grpc_base64_decode(cur, 1); + if (GPR_SLICE_IS_EMPTY(signature)) goto error; + retrieve_key_and_verify( + exec_ctx, + verifier_cb_ctx_create(verifier, pollset, header, claims, audience, + signature, jwt, signed_jwt_len, user_data, cb)); + return; + +error: + if (header != NULL) jose_header_destroy(header); + if (claims != NULL) grpc_jwt_claims_destroy(claims); + cb(user_data, GRPC_JWT_VERIFIER_BAD_FORMAT, NULL); +} + +grpc_jwt_verifier *grpc_jwt_verifier_create( + const grpc_jwt_verifier_email_domain_key_url_mapping *mappings, + size_t num_mappings) { + grpc_jwt_verifier *v = gpr_malloc(sizeof(grpc_jwt_verifier)); + memset(v, 0, sizeof(grpc_jwt_verifier)); + grpc_httpcli_context_init(&v->http_ctx); + + /* We know at least of one mapping. */ + v->allocated_mappings = 1 + num_mappings; + v->mappings = gpr_malloc(v->allocated_mappings * sizeof(email_key_mapping)); + verifier_put_mapping(v, GRPC_GOOGLE_SERVICE_ACCOUNTS_EMAIL_DOMAIN, + GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX); + /* User-Provided mappings. */ + if (mappings != NULL) { + size_t i; + for (i = 0; i < num_mappings; i++) { + verifier_put_mapping(v, mappings[i].email_domain, + mappings[i].key_url_prefix); + } + } + return v; +} + +void grpc_jwt_verifier_destroy(grpc_jwt_verifier *v) { + size_t i; + if (v == NULL) return; + grpc_httpcli_context_destroy(&v->http_ctx); + if (v->mappings != NULL) { + for (i = 0; i < v->num_mappings; i++) { + gpr_free(v->mappings[i].email_domain); + gpr_free(v->mappings[i].key_url_prefix); + } + gpr_free(v->mappings); + } + gpr_free(v); +} diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h new file mode 100644 index 0000000000..b0f6d1c240 --- /dev/null +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -0,0 +1,136 @@ +/* + * + * 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_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" + +#include +#include + +/* --- Constants. --- */ + +#define GRPC_OPENID_CONFIG_URL_SUFFIX "/.well-known/openid-configuration" +#define GRPC_GOOGLE_SERVICE_ACCOUNTS_EMAIL_DOMAIN \ + "developer.gserviceaccount.com" +#define GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX \ + "www.googleapis.com/robot/v1/metadata/x509" + +/* --- grpc_jwt_verifier_status. --- */ + +typedef enum { + GRPC_JWT_VERIFIER_OK = 0, + GRPC_JWT_VERIFIER_BAD_SIGNATURE, + GRPC_JWT_VERIFIER_BAD_FORMAT, + GRPC_JWT_VERIFIER_BAD_AUDIENCE, + GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, + GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE, + GRPC_JWT_VERIFIER_GENERIC_ERROR +} grpc_jwt_verifier_status; + +const char *grpc_jwt_verifier_status_to_string(grpc_jwt_verifier_status status); + +/* --- grpc_jwt_claims. --- */ + +typedef struct grpc_jwt_claims grpc_jwt_claims; + +void grpc_jwt_claims_destroy(grpc_jwt_claims *claims); + +/* Returns the whole JSON tree of the claims. */ +const grpc_json *grpc_jwt_claims_json(const grpc_jwt_claims *claims); + +/* Access to registered claims in https://tools.ietf.org/html/rfc7519#page-9 */ +const char *grpc_jwt_claims_subject(const grpc_jwt_claims *claims); +const char *grpc_jwt_claims_issuer(const grpc_jwt_claims *claims); +const char *grpc_jwt_claims_id(const grpc_jwt_claims *claims); +const char *grpc_jwt_claims_audience(const grpc_jwt_claims *claims); +gpr_timespec grpc_jwt_claims_issued_at(const grpc_jwt_claims *claims); +gpr_timespec grpc_jwt_claims_expires_at(const grpc_jwt_claims *claims); +gpr_timespec grpc_jwt_claims_not_before(const grpc_jwt_claims *claims); + +/* --- grpc_jwt_verifier. --- */ + +typedef struct grpc_jwt_verifier grpc_jwt_verifier; + +typedef struct { + /* The email domain is the part after the @ sign. */ + const char *email_domain; + + /* The key url prefix will be used to get the public key from the issuer: + https:/// + Therefore the key_url_prefix must NOT contain https://. */ + const char *key_url_prefix; +} grpc_jwt_verifier_email_domain_key_url_mapping; + +/* Globals to control the verifier. Not thread-safe. */ +extern gpr_timespec grpc_jwt_verifier_clock_skew; +extern gpr_timespec grpc_jwt_verifier_max_delay; + +/* The verifier can be created with some custom mappings to help with key + discovery in the case where the issuer is an email address. + mappings can be NULL in which case num_mappings MUST be 0. + A verifier object has one built-in mapping (unless overridden): + GRPC_GOOGLE_SERVICE_ACCOUNTS_EMAIL_DOMAIN -> + GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX.*/ +grpc_jwt_verifier *grpc_jwt_verifier_create( + const grpc_jwt_verifier_email_domain_key_url_mapping *mappings, + size_t num_mappings); + +/*The verifier must not be destroyed if there are still outstanding callbacks.*/ +void grpc_jwt_verifier_destroy(grpc_jwt_verifier *verifier); + +/* User provided callback that will be called when the verification of the JWT + is done (maybe in another thread). + It is the responsibility of the callee to call grpc_jwt_claims_destroy on + the claims. */ +typedef void (*grpc_jwt_verification_done_cb)(void *user_data, + grpc_jwt_verifier_status status, + grpc_jwt_claims *claims); + +/* Verifies for the JWT for the given expected audience. */ +void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, + grpc_jwt_verifier *verifier, + grpc_pollset *pollset, const char *jwt, + const char *audience, + grpc_jwt_verification_done_cb cb, + void *user_data); + +/* --- TESTING ONLY exposed functions. --- */ + +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_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 0000000000..0984d1f53f --- /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 0000000000..6cdcc68514 --- /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 0000000000..b075e14551 --- /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 0000000000..cdabbbd30f --- /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 0000000000..ee8d2e4365 --- /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 0000000000..ea4bdabc04 --- /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/credentials_metadata.c b/src/core/lib/security/credentials_metadata.c deleted file mode 100644 index bd00194278..0000000000 --- a/src/core/lib/security/credentials_metadata.c +++ /dev/null @@ -1,101 +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 - -static void store_ensure_capacity(grpc_credentials_md_store *store) { - if (store->num_entries == store->allocated) { - store->allocated = (store->allocated == 0) ? 1 : store->allocated * 2; - store->entries = gpr_realloc( - store->entries, store->allocated * sizeof(grpc_credentials_md)); - } -} - -grpc_credentials_md_store *grpc_credentials_md_store_create( - size_t initial_capacity) { - grpc_credentials_md_store *store = - gpr_malloc(sizeof(grpc_credentials_md_store)); - memset(store, 0, sizeof(grpc_credentials_md_store)); - if (initial_capacity > 0) { - store->entries = gpr_malloc(initial_capacity * sizeof(grpc_credentials_md)); - store->allocated = initial_capacity; - } - gpr_ref_init(&store->refcount, 1); - return store; -} - -void grpc_credentials_md_store_add(grpc_credentials_md_store *store, - gpr_slice key, gpr_slice value) { - if (store == NULL) return; - store_ensure_capacity(store); - store->entries[store->num_entries].key = gpr_slice_ref(key); - store->entries[store->num_entries].value = gpr_slice_ref(value); - store->num_entries++; -} - -void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, - const char *key, - const char *value) { - if (store == NULL) return; - store_ensure_capacity(store); - store->entries[store->num_entries].key = gpr_slice_from_copied_string(key); - store->entries[store->num_entries].value = - gpr_slice_from_copied_string(value); - store->num_entries++; -} - -grpc_credentials_md_store *grpc_credentials_md_store_ref( - grpc_credentials_md_store *store) { - if (store == NULL) return NULL; - gpr_ref(&store->refcount); - return store; -} - -void grpc_credentials_md_store_unref(grpc_credentials_md_store *store) { - if (store == NULL) return; - if (gpr_unref(&store->refcount)) { - if (store->entries != NULL) { - size_t i; - for (i = 0; i < store->num_entries; i++) { - gpr_slice_unref(store->entries[i].key); - gpr_slice_unref(store->entries[i].value); - } - gpr_free(store->entries); - } - gpr_free(store); - } -} diff --git a/src/core/lib/security/credentials_posix.c b/src/core/lib/security/credentials_posix.c deleted file mode 100644 index a07de182a0..0000000000 --- a/src/core/lib/security/credentials_posix.c +++ /dev/null @@ -1,61 +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 - -#ifdef GPR_POSIX_FILE - -#include "src/core/lib/security/credentials.h" - -#include -#include -#include - -#include "src/core/lib/support/env.h" -#include "src/core/lib/support/string.h" - -char *grpc_get_well_known_google_credentials_file_path_impl(void) { - char *result = NULL; - char *home = gpr_getenv("HOME"); - if (home == NULL) { - gpr_log(GPR_ERROR, "Could not get HOME environment variable."); - return NULL; - } - gpr_asprintf(&result, "%s/.config/%s/%s", home, - GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY, - GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE); - gpr_free(home); - return result; -} - -#endif /* GPR_POSIX_FILE */ diff --git a/src/core/lib/security/credentials_win32.c b/src/core/lib/security/credentials_win32.c deleted file mode 100644 index d29847af38..0000000000 --- a/src/core/lib/security/credentials_win32.c +++ /dev/null @@ -1,61 +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 - -#ifdef GPR_WIN32 - -#include "src/core/lib/security/credentials.h" - -#include -#include -#include - -#include "src/core/lib/support/env.h" -#include "src/core/lib/support/string.h" - -char *grpc_get_well_known_google_credentials_file_path_impl(void) { - char *result = NULL; - char *appdata_path = gpr_getenv("APPDATA"); - if (appdata_path == NULL) { - gpr_log(GPR_ERROR, "Could not get APPDATA environment variable."); - return NULL; - } - gpr_asprintf(&result, "%s/%s/%s", appdata_path, - GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY, - GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE); - gpr_free(appdata_path); - return result; -} - -#endif /* GPR_WIN32 */ diff --git a/src/core/lib/security/google_default_credentials.c b/src/core/lib/security/google_default_credentials.c deleted file mode 100644 index 236f1d7fa7..0000000000 --- a/src/core/lib/security/google_default_credentials.c +++ /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. - * - */ - -#include "src/core/lib/security/credentials.h" - -#include - -#include -#include -#include - -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" -#include "src/core/lib/support/env.h" -#include "src/core/lib/support/load_file.h" -#include "src/core/lib/surface/api_trace.h" - -/* -- Constants. -- */ - -#define GRPC_COMPUTE_ENGINE_DETECTION_HOST "metadata.google.internal" - -/* -- Default credentials. -- */ - -static grpc_channel_credentials *default_credentials = NULL; -static int compute_engine_detection_done = 0; -static gpr_mu g_state_mu; -static gpr_mu *g_polling_mu; -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; - int is_done; - int success; -} compute_engine_detector; - -static void on_compute_engine_detection_http_response( - grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_http_response *response) { - compute_engine_detector *detector = (compute_engine_detector *)user_data; - if (response != NULL && response->status == 200 && 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]; - if (strcmp(header->key, "Metadata-Flavor") == 0 && - strcmp(header->value, "Google") == 0) { - detector->success = 1; - break; - } - } - } - gpr_mu_lock(g_polling_mu); - detector->is_done = 1; - grpc_pollset_kick(detector->pollset, NULL); - gpr_mu_unlock(g_polling_mu); -} - -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool s) { - grpc_pollset_destroy(p); -} - -static int is_stack_running_on_compute_engine(void) { - compute_engine_detector detector; - grpc_httpcli_request request; - grpc_httpcli_context context; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_closure destroy_closure; - - /* The http call is local. If it takes more than one sec, it is for sure not - 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.is_done = 0; - detector.success = 0; - - memset(&request, 0, sizeof(grpc_httpcli_request)); - request.host = GRPC_COMPUTE_ENGINE_DETECTION_HOST; - request.http.path = "/"; - - grpc_httpcli_context_init(&context); - - 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_exec_ctx_finish(&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. */ - 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)); - } - 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_exec_ctx_finish(&exec_ctx); - g_polling_mu = NULL; - - gpr_free(detector.pollset); - - return detector.success; -} - -/* Takes ownership of creds_path if not NULL. */ -static grpc_call_credentials *create_default_creds_from_path(char *creds_path) { - grpc_json *json = NULL; - grpc_auth_json_key key; - grpc_auth_refresh_token token; - grpc_call_credentials *result = NULL; - gpr_slice creds_data = gpr_empty_slice(); - int file_ok = 0; - if (creds_path == NULL) goto end; - creds_data = gpr_load_file(creds_path, 0, &file_ok); - if (!file_ok) goto end; - json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(creds_data), GPR_SLICE_LENGTH(creds_data)); - if (json == NULL) goto end; - - /* First, try an auth json key. */ - key = grpc_auth_json_key_create_from_json(json); - if (grpc_auth_json_key_is_valid(&key)) { - result = - grpc_service_account_jwt_access_credentials_create_from_auth_json_key( - key, grpc_max_auth_token_lifetime()); - goto end; - } - - /* Then try a refresh token if the auth json key was invalid. */ - token = grpc_auth_refresh_token_create_from_json(json); - if (grpc_auth_refresh_token_is_valid(&token)) { - result = - grpc_refresh_token_credentials_create_from_auth_refresh_token(token); - goto end; - } - -end: - if (creds_path != NULL) gpr_free(creds_path); - gpr_slice_unref(creds_data); - if (json != NULL) grpc_json_destroy(json); - return result; -} - -grpc_channel_credentials *grpc_google_default_credentials_create(void) { - grpc_channel_credentials *result = NULL; - grpc_call_credentials *call_creds = NULL; - - GRPC_API_TRACE("grpc_google_default_credentials_create(void)", 0, ()); - - gpr_once_init(&g_once, init_default_credentials); - - gpr_mu_lock(&g_state_mu); - - if (default_credentials != NULL) { - result = grpc_channel_credentials_ref(default_credentials); - goto end; - } - - /* First, try the environment variable. */ - call_creds = create_default_creds_from_path( - gpr_getenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR)); - if (call_creds != NULL) goto end; - - /* Then the well-known file. */ - call_creds = create_default_creds_from_path( - grpc_get_well_known_google_credentials_file_path()); - if (call_creds != NULL) goto end; - - /* At last try to see if we're on compute engine (do the detection only once - since it requires a network test). */ - if (!compute_engine_detection_done) { - int need_compute_engine_creds = is_stack_running_on_compute_engine(); - compute_engine_detection_done = 1; - if (need_compute_engine_creds) { - call_creds = grpc_google_compute_engine_credentials_create(NULL); - } - } - -end: - if (result == NULL) { - if (call_creds != NULL) { - /* Blend with default ssl credentials and add a global reference so that - it - can be cached and re-served. */ - grpc_channel_credentials *ssl_creds = - grpc_ssl_credentials_create(NULL, NULL, NULL); - default_credentials = grpc_channel_credentials_ref( - grpc_composite_channel_credentials_create(ssl_creds, call_creds, - NULL)); - GPR_ASSERT(default_credentials != NULL); - grpc_channel_credentials_unref(ssl_creds); - grpc_call_credentials_unref(call_creds); - result = default_credentials; - } else { - gpr_log(GPR_ERROR, "Could not create google default credentials."); - } - } - gpr_mu_unlock(&g_state_mu); - return result; -} - -void grpc_flush_cached_google_default_credentials(void) { - gpr_once_init(&g_once, init_default_credentials); - gpr_mu_lock(&g_state_mu); - if (default_credentials != NULL) { - grpc_channel_credentials_unref(default_credentials); - default_credentials = NULL; - } - compute_engine_detection_done = 0; - gpr_mu_unlock(&g_state_mu); -} - -/* -- Well known credentials path. -- */ - -static grpc_well_known_credentials_path_getter creds_path_getter = NULL; - -char *grpc_get_well_known_google_credentials_file_path(void) { - if (creds_path_getter != NULL) return creds_path_getter(); - return grpc_get_well_known_google_credentials_file_path_impl(); -} - -void grpc_override_well_known_credentials_path_getter( - grpc_well_known_credentials_path_getter getter) { - creds_path_getter = getter; -} diff --git a/src/core/lib/security/handshake.c b/src/core/lib/security/handshake.c deleted file mode 100644 index d5fe0c7b7d..0000000000 --- a/src/core/lib/security/handshake.c +++ /dev/null @@ -1,336 +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/handshake.h" - -#include -#include - -#include -#include -#include -#include "src/core/lib/security/secure_endpoint.h" -#include "src/core/lib/security/security_context.h" - -#define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 - -typedef struct { - grpc_security_connector *connector; - tsi_handshaker *handshaker; - bool is_client_side; - unsigned char *handshake_buffer; - size_t handshake_buffer_size; - grpc_endpoint *wrapped_endpoint; - grpc_endpoint *secure_endpoint; - gpr_slice_buffer left_overs; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; - grpc_security_handshake_done_cb cb; - void *user_data; - grpc_closure on_handshake_data_sent_to_peer; - grpc_closure on_handshake_data_received_from_peer; - grpc_auth_context *auth_context; -} grpc_security_handshake; - -static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, - void *setup, bool success); - -static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, - bool success); - -static void security_connector_remove_handshake(grpc_security_handshake *h) { - GPR_ASSERT(!h->is_client_side); - grpc_security_connector_handshake_list *node; - grpc_security_connector_handshake_list *tmp; - grpc_server_security_connector *sc = - (grpc_server_security_connector *)h->connector; - gpr_mu_lock(&sc->mu); - node = sc->handshaking_handshakes; - if (node && node->handshake == h) { - sc->handshaking_handshakes = node->next; - gpr_free(node); - gpr_mu_unlock(&sc->mu); - return; - } - while (node) { - if (node->next->handshake == h) { - tmp = node->next; - node->next = node->next->next; - gpr_free(tmp); - gpr_mu_unlock(&sc->mu); - return; - } - node = node->next; - } - gpr_mu_unlock(&sc->mu); -} - -static void security_handshake_done(grpc_exec_ctx *exec_ctx, - grpc_security_handshake *h, - int is_success) { - if (!h->is_client_side) { - security_connector_remove_handshake(h); - } - if (is_success) { - h->cb(exec_ctx, h->user_data, GRPC_SECURITY_OK, h->secure_endpoint, - h->auth_context); - } else { - if (h->secure_endpoint != NULL) { - grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); - grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); - } else { - grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); - } - 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); -} - -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; - 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); - 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); - return; - } - h->secure_endpoint = - grpc_secure_endpoint_create(protector, h->wrapped_endpoint, - 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); - return; -} - -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); - - 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); - return; - } - grpc_security_connector_check_peer(exec_ctx, h->connector, peer, - on_peer_checked, h); -} - -static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, - grpc_security_handshake *h) { - size_t offset = 0; - tsi_result result = TSI_OK; - gpr_slice to_send; - - do { - size_t to_send_size = h->handshake_buffer_size - offset; - result = tsi_handshaker_get_bytes_to_send_to_peer( - h->handshaker, h->handshake_buffer + offset, &to_send_size); - offset += to_send_size; - if (result == TSI_INCOMPLETE_DATA) { - h->handshake_buffer_size *= 2; - h->handshake_buffer = - gpr_realloc(h->handshake_buffer, h->handshake_buffer_size); - } - } 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); - return; - } - - to_send = - gpr_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); - gpr_slice_buffer_reset_and_unref(&h->outgoing); - gpr_slice_buffer_add(&h->outgoing, to_send); - /* TODO(klempner,jboeuf): This should probably use the client setup - deadline */ - grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, - &h->on_handshake_data_sent_to_peer); -} - -static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, - void *handshake, - bool success) { - grpc_security_handshake *h = handshake; - size_t consumed_slice_size = 0; - tsi_result result = TSI_OK; - size_t i; - 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); - return; - } - - for (i = 0; i < h->incoming.count; i++) { - consumed_slice_size = GPR_SLICE_LENGTH(h->incoming.slices[i]); - result = tsi_handshaker_process_bytes_from_peer( - h->handshaker, GPR_SLICE_START_PTR(h->incoming.slices[i]), - &consumed_slice_size); - if (!tsi_handshaker_is_in_progress(h->handshaker)) break; - } - - if (tsi_handshaker_is_in_progress(h->handshaker)) { - /* We may need more data. */ - if (result == TSI_INCOMPLETE_DATA) { - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, &h->incoming, - &h->on_handshake_data_received_from_peer); - return; - } else { - send_handshake_bytes_to_peer(exec_ctx, h); - return; - } - } - - 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); - return; - } - - /* Handshake is done and successful this point. */ - has_left_overs_in_current_slice = - (consumed_slice_size < GPR_SLICE_LENGTH(h->incoming.slices[i])); - num_left_overs = - (has_left_overs_in_current_slice ? 1 : 0) + h->incoming.count - i - 1; - if (num_left_overs == 0) { - check_peer(exec_ctx, h); - return; - } - - /* Put the leftovers in our buffer (ownership transfered). */ - if (has_left_overs_in_current_slice) { - gpr_slice_buffer_add( - &h->left_overs, - gpr_slice_split_tail(&h->incoming.slices[i], consumed_slice_size)); - gpr_slice_unref( - h->incoming.slices[i]); /* split_tail above increments refcount. */ - } - gpr_slice_buffer_addn( - &h->left_overs, &h->incoming.slices[i + 1], - num_left_overs - (size_t)has_left_overs_in_current_slice); - check_peer(exec_ctx, h); -} - -/* 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) { - 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); - return; - } - - /* We may be done. */ - if (tsi_handshaker_is_in_progress(h->handshaker)) { - /* TODO(klempner,jboeuf): This should probably use the client setup - deadline */ - grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, &h->incoming, - &h->on_handshake_data_received_from_peer); - } else { - check_peer(exec_ctx, h); - } -} - -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) { - grpc_security_connector_handshake_list *handshake_node; - grpc_security_handshake *h = gpr_malloc(sizeof(grpc_security_handshake)); - memset(h, 0, sizeof(grpc_security_handshake)); - h->handshaker = handshaker; - h->connector = GRPC_SECURITY_CONNECTOR_REF(connector, "handshake"); - h->is_client_side = is_client_side; - h->handshake_buffer_size = GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE; - h->handshake_buffer = gpr_malloc(h->handshake_buffer_size); - h->wrapped_endpoint = nonsecure_endpoint; - h->user_data = user_data; - h->cb = cb; - 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, - on_handshake_data_received_from_peer, h); - gpr_slice_buffer_init(&h->left_overs); - gpr_slice_buffer_init(&h->outgoing); - gpr_slice_buffer_init(&h->incoming); - if (!is_client_side) { - grpc_server_security_connector *server_connector = - (grpc_server_security_connector *)connector; - handshake_node = gpr_malloc(sizeof(grpc_security_connector_handshake_list)); - handshake_node->handshake = h; - gpr_mu_lock(&server_connector->mu); - handshake_node->next = server_connector->handshaking_handshakes; - server_connector->handshaking_handshakes = handshake_node; - gpr_mu_unlock(&server_connector->mu); - } - send_handshake_bytes_to_peer(exec_ctx, h); -} - -void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, - void *handshake) { - grpc_security_handshake *h = handshake; - grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); -} diff --git a/src/core/lib/security/handshake.h b/src/core/lib/security/handshake.h deleted file mode 100644 index f34476ed49..0000000000 --- a/src/core/lib/security/handshake.h +++ /dev/null @@ -1,51 +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_SECURITY_HANDSHAKE_H -#define GRPC_CORE_LIB_SECURITY_HANDSHAKE_H - -#include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/security/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_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); - -#endif /* GRPC_CORE_LIB_SECURITY_HANDSHAKE_H */ diff --git a/src/core/lib/security/json_token.c b/src/core/lib/security/json_token.c deleted file mode 100644 index d5bc2c8d60..0000000000 --- a/src/core/lib/security/json_token.c +++ /dev/null @@ -1,411 +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/json_token.h" - -#include - -#include -#include -#include - -#include "src/core/lib/security/b64.h" -#include "src/core/lib/support/string.h" - -#include -#include -#include - -/* --- Constants. --- */ - -/* 1 hour max. */ -gpr_timespec grpc_max_auth_token_lifetime() { - gpr_timespec out; - out.tv_sec = 3600; - out.tv_nsec = 0; - out.clock_type = GPR_TIMESPAN; - return out; -} - -#define GRPC_JWT_RSA_SHA256_ALGORITHM "RS256" -#define GRPC_JWT_TYPE "JWT" - -/* --- Override for testing. --- */ - -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); -} - -grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json *json) { - grpc_auth_json_key result; - BIO *bio = NULL; - const char *prop_value; - int success = 0; - - memset(&result, 0, sizeof(grpc_auth_json_key)); - 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_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)) { - goto end; - } - - prop_value = json_get_string_property(json, "private_key"); - if (prop_value == NULL) { - goto end; - } - bio = BIO_new(BIO_s_mem()); - success = BIO_puts(bio, prop_value); - if ((success < 0) || ((size_t)success != strlen(prop_value))) { - gpr_log(GPR_ERROR, "Could not write into openssl BIO."); - goto end; - } - result.private_key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, ""); - if (result.private_key == NULL) { - gpr_log(GPR_ERROR, "Could not deserialize private key."); - goto end; - } - success = 1; - -end: - if (bio != NULL) BIO_free(bio); - if (!success) grpc_auth_json_key_destruct(&result); - return result; -} - -grpc_auth_json_key grpc_auth_json_key_create_from_string( - const char *json_string) { - char *scratchpad = gpr_strdup(json_string); - grpc_json *json = grpc_json_parse_string(scratchpad); - grpc_auth_json_key result = grpc_auth_json_key_create_from_json(json); - if (json != NULL) grpc_json_destroy(json); - gpr_free(scratchpad); - return result; -} - -void grpc_auth_json_key_destruct(grpc_auth_json_key *json_key) { - if (json_key == NULL) return; - json_key->type = GRPC_AUTH_JSON_TYPE_INVALID; - if (json_key->client_id != NULL) { - gpr_free(json_key->client_id); - json_key->client_id = NULL; - } - if (json_key->private_key_id != NULL) { - gpr_free(json_key->private_key_id); - json_key->private_key_id = NULL; - } - if (json_key->client_email != NULL) { - gpr_free(json_key->client_email); - json_key->client_email = NULL; - } - if (json_key->private_key != NULL) { - RSA_free(json_key->private_key); - json_key->private_key = NULL; - } -} - -/* --- jwt encoding and signature. --- */ - -static grpc_json *create_child(grpc_json *brother, grpc_json *parent, - const char *key, const char *value, - grpc_json_type type) { - grpc_json *child = grpc_json_create(type); - if (brother) brother->next = child; - if (!parent->child) parent->child = child; - child->parent = parent; - child->value = value; - child->key = key; - return child; -} - -static char *encoded_jwt_header(const char *key_id, const char *algorithm) { - grpc_json *json = grpc_json_create(GRPC_JSON_OBJECT); - grpc_json *child = NULL; - char *json_str = NULL; - char *result = NULL; - - child = create_child(NULL, json, "alg", algorithm, GRPC_JSON_STRING); - child = create_child(child, json, "typ", GRPC_JWT_TYPE, GRPC_JSON_STRING); - create_child(child, json, "kid", key_id, GRPC_JSON_STRING); - - json_str = grpc_json_dump_to_string(json, 0); - result = grpc_base64_encode(json_str, strlen(json_str), 1, 0); - gpr_free(json_str); - grpc_json_destroy(json); - return result; -} - -static char *encoded_jwt_claim(const grpc_auth_json_key *json_key, - const char *audience, - gpr_timespec token_lifetime, const char *scope) { - grpc_json *json = grpc_json_create(GRPC_JSON_OBJECT); - grpc_json *child = NULL; - char *json_str = NULL; - char *result = NULL; - gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); - gpr_timespec expiration = gpr_time_add(now, token_lifetime); - char now_str[GPR_LTOA_MIN_BUFSIZE]; - char expiration_str[GPR_LTOA_MIN_BUFSIZE]; - if (gpr_time_cmp(token_lifetime, grpc_max_auth_token_lifetime()) > 0) { - gpr_log(GPR_INFO, "Cropping token lifetime to maximum allowed value."); - expiration = gpr_time_add(now, grpc_max_auth_token_lifetime()); - } - int64_ttoa(now.tv_sec, now_str); - int64_ttoa(expiration.tv_sec, expiration_str); - - child = - create_child(NULL, json, "iss", json_key->client_email, GRPC_JSON_STRING); - if (scope != NULL) { - child = create_child(child, json, "scope", scope, GRPC_JSON_STRING); - } else { - /* Unscoped JWTs need a sub field. */ - child = create_child(child, json, "sub", json_key->client_email, - GRPC_JSON_STRING); - } - - child = create_child(child, json, "aud", audience, GRPC_JSON_STRING); - child = create_child(child, json, "iat", now_str, GRPC_JSON_NUMBER); - create_child(child, json, "exp", expiration_str, GRPC_JSON_NUMBER); - - json_str = grpc_json_dump_to_string(json, 0); - result = grpc_base64_encode(json_str, strlen(json_str), 1, 0); - gpr_free(json_str); - grpc_json_destroy(json); - return result; -} - -static char *dot_concat_and_free_strings(char *str1, char *str2) { - size_t str1_len = strlen(str1); - size_t str2_len = strlen(str2); - size_t result_len = str1_len + 1 /* dot */ + str2_len; - char *result = gpr_malloc(result_len + 1 /* NULL terminated */); - char *current = result; - memcpy(current, str1, str1_len); - current += str1_len; - *(current++) = '.'; - memcpy(current, str2, str2_len); - current += str2_len; - GPR_ASSERT(current >= result); - GPR_ASSERT((uintptr_t)(current - result) == result_len); - *current = '\0'; - gpr_free(str1); - gpr_free(str2); - return result; -} - -const EVP_MD *openssl_digest_from_algorithm(const char *algorithm) { - if (strcmp(algorithm, GRPC_JWT_RSA_SHA256_ALGORITHM) == 0) { - return EVP_sha256(); - } else { - gpr_log(GPR_ERROR, "Unknown algorithm %s.", algorithm); - return NULL; - } -} - -char *compute_and_encode_signature(const grpc_auth_json_key *json_key, - const char *signature_algorithm, - const char *to_sign) { - const EVP_MD *md = openssl_digest_from_algorithm(signature_algorithm); - EVP_MD_CTX *md_ctx = NULL; - EVP_PKEY *key = EVP_PKEY_new(); - size_t sig_len = 0; - unsigned char *sig = NULL; - char *result = NULL; - if (md == NULL) return NULL; - md_ctx = EVP_MD_CTX_create(); - if (md_ctx == NULL) { - gpr_log(GPR_ERROR, "Could not create MD_CTX"); - goto end; - } - EVP_PKEY_set1_RSA(key, json_key->private_key); - if (EVP_DigestSignInit(md_ctx, NULL, md, NULL, key) != 1) { - gpr_log(GPR_ERROR, "DigestInit failed."); - goto end; - } - if (EVP_DigestSignUpdate(md_ctx, to_sign, strlen(to_sign)) != 1) { - gpr_log(GPR_ERROR, "DigestUpdate failed."); - goto end; - } - if (EVP_DigestSignFinal(md_ctx, NULL, &sig_len) != 1) { - gpr_log(GPR_ERROR, "DigestFinal (get signature length) failed."); - goto end; - } - sig = gpr_malloc(sig_len); - if (EVP_DigestSignFinal(md_ctx, sig, &sig_len) != 1) { - gpr_log(GPR_ERROR, "DigestFinal (signature compute) failed."); - goto end; - } - result = grpc_base64_encode(sig, sig_len, 1, 0); - -end: - if (key != NULL) EVP_PKEY_free(key); - if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx); - if (sig != NULL) gpr_free(sig); - return result; -} - -char *grpc_jwt_encode_and_sign(const grpc_auth_json_key *json_key, - const char *audience, - gpr_timespec token_lifetime, const char *scope) { - if (g_jwt_encode_and_sign_override != NULL) { - return g_jwt_encode_and_sign_override(json_key, audience, token_lifetime, - scope); - } else { - const char *sig_algo = GRPC_JWT_RSA_SHA256_ALGORITHM; - char *to_sign = dot_concat_and_free_strings( - encoded_jwt_header(json_key->private_key_id, sig_algo), - encoded_jwt_claim(json_key, audience, token_lifetime, scope)); - char *sig = compute_and_encode_signature(json_key, sig_algo, to_sign); - if (sig == NULL) { - gpr_free(to_sign); - return NULL; - } - return dot_concat_and_free_strings(to_sign, sig); - } -} - -void grpc_jwt_encode_and_sign_set_override( - grpc_jwt_encode_and_sign_override func) { - 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/json_token.h deleted file mode 100644 index 123fa652fd..0000000000 --- a/src/core/lib/security/json_token.h +++ /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. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H -#define GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H - -#include -#include - -#include "src/core/lib/json/json.h" - -/* --- Constants. --- */ - -#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 { - const char *type; - char *private_key_id; - char *client_id; - char *client_email; - RSA *private_key; -} grpc_auth_json_key; - -/* Returns 1 if the object is valid, 0 otherwise. */ -int grpc_auth_json_key_is_valid(const grpc_auth_json_key *json_key); - -/* Creates a json_key object from string. Returns an invalid object if a parsing - error has been encountered. */ -grpc_auth_json_key grpc_auth_json_key_create_from_string( - const char *json_string); - -/* Creates a json_key object from parsed json. Returns an invalid object if a - parsing error has been encountered. */ -grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json *json); - -/* Destructs the object. */ -void grpc_auth_json_key_destruct(grpc_auth_json_key *json_key); - -/* --- json token encoding and signing. --- */ - -/* Caller is responsible for calling gpr_free on the returned value. May return - NULL on invalid input. The scope parameter may be NULL. */ -char *grpc_jwt_encode_and_sign(const grpc_auth_json_key *json_key, - const char *audience, - gpr_timespec token_lifetime, const char *scope); - -/* Override encode_and_sign function for testing. */ -typedef char *(*grpc_jwt_encode_and_sign_override)( - const grpc_auth_json_key *json_key, const char *audience, - gpr_timespec token_lifetime, const char *scope); - -/* Set a custom encode_and_sign override for testing. */ -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 */ diff --git a/src/core/lib/security/jwt_verifier.c b/src/core/lib/security/jwt_verifier.c deleted file mode 100644 index 0e012294de..0000000000 --- a/src/core/lib/security/jwt_verifier.c +++ /dev/null @@ -1,843 +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/jwt_verifier.h" - -#include -#include - -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/security/b64.h" -#include "src/core/lib/tsi/ssl_types.h" - -#include -#include -#include -#include -#include - -/* --- Utils. --- */ - -const char *grpc_jwt_verifier_status_to_string( - grpc_jwt_verifier_status status) { - switch (status) { - case GRPC_JWT_VERIFIER_OK: - return "OK"; - case GRPC_JWT_VERIFIER_BAD_SIGNATURE: - return "BAD_SIGNATURE"; - case GRPC_JWT_VERIFIER_BAD_FORMAT: - return "BAD_FORMAT"; - case GRPC_JWT_VERIFIER_BAD_AUDIENCE: - return "BAD_AUDIENCE"; - case GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR: - return "KEY_RETRIEVAL_ERROR"; - case GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE: - return "TIME_CONSTRAINT_FAILURE"; - case GRPC_JWT_VERIFIER_GENERIC_ERROR: - return "GENERIC_ERROR"; - default: - return "UNKNOWN"; - } -} - -static const EVP_MD *evp_md_from_alg(const char *alg) { - if (strcmp(alg, "RS256") == 0) { - return EVP_sha256(); - } else if (strcmp(alg, "RS384") == 0) { - return EVP_sha384(); - } else if (strcmp(alg, "RS512") == 0) { - return EVP_sha512(); - } else { - return NULL; - } -} - -static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, - gpr_slice *buffer) { - grpc_json *json; - - *buffer = grpc_base64_decode_with_len(str, len, 1); - if (GPR_SLICE_IS_EMPTY(*buffer)) { - gpr_log(GPR_ERROR, "Invalid base64."); - return NULL; - } - json = grpc_json_parse_string_with_len((char *)GPR_SLICE_START_PTR(*buffer), - GPR_SLICE_LENGTH(*buffer)); - if (json == NULL) { - gpr_slice_unref(*buffer); - gpr_log(GPR_ERROR, "JSON parsing error."); - } - return json; -} - -static const char *validate_string_field(const grpc_json *json, - const char *key) { - if (json->type != GRPC_JSON_STRING) { - gpr_log(GPR_ERROR, "Invalid %s field [%s]", key, json->value); - return NULL; - } - return json->value; -} - -static gpr_timespec validate_time_field(const grpc_json *json, - const char *key) { - gpr_timespec result = gpr_time_0(GPR_CLOCK_REALTIME); - if (json->type != GRPC_JSON_NUMBER) { - gpr_log(GPR_ERROR, "Invalid %s field [%s]", key, json->value); - return result; - } - result.tv_sec = strtol(json->value, NULL, 10); - return result; -} - -/* --- JOSE header. see http://tools.ietf.org/html/rfc7515#section-4 --- */ - -typedef struct { - const char *alg; - const char *kid; - const char *typ; - /* TODO(jboeuf): Add others as needed (jku, jwk, x5u, x5c and so on...). */ - gpr_slice buffer; -} jose_header; - -static void jose_header_destroy(jose_header *h) { - gpr_slice_unref(h->buffer); - gpr_free(h); -} - -/* Takes ownership of json and buffer. */ -static jose_header *jose_header_from_json(grpc_json *json, gpr_slice buffer) { - grpc_json *cur; - jose_header *h = gpr_malloc(sizeof(jose_header)); - memset(h, 0, sizeof(jose_header)); - h->buffer = buffer; - for (cur = json->child; cur != NULL; cur = cur->next) { - if (strcmp(cur->key, "alg") == 0) { - /* We only support RSA-1.5 signatures for now. - Beware of this if we add HMAC support: - https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/ - */ - if (cur->type != GRPC_JSON_STRING || strncmp(cur->value, "RS", 2) || - evp_md_from_alg(cur->value) == NULL) { - gpr_log(GPR_ERROR, "Invalid alg field [%s]", cur->value); - goto error; - } - h->alg = cur->value; - } else if (strcmp(cur->key, "typ") == 0) { - h->typ = validate_string_field(cur, "typ"); - if (h->typ == NULL) goto error; - } else if (strcmp(cur->key, "kid") == 0) { - h->kid = validate_string_field(cur, "kid"); - if (h->kid == NULL) goto error; - } - } - if (h->alg == NULL) { - gpr_log(GPR_ERROR, "Missing alg field."); - goto error; - } - grpc_json_destroy(json); - h->buffer = buffer; - return h; - -error: - grpc_json_destroy(json); - jose_header_destroy(h); - return NULL; -} - -/* --- JWT claims. see http://tools.ietf.org/html/rfc7519#section-4.1 */ - -struct grpc_jwt_claims { - /* Well known properties already parsed. */ - const char *sub; - const char *iss; - const char *aud; - const char *jti; - gpr_timespec iat; - gpr_timespec exp; - gpr_timespec nbf; - - grpc_json *json; - gpr_slice buffer; -}; - -void grpc_jwt_claims_destroy(grpc_jwt_claims *claims) { - grpc_json_destroy(claims->json); - gpr_slice_unref(claims->buffer); - gpr_free(claims); -} - -const grpc_json *grpc_jwt_claims_json(const grpc_jwt_claims *claims) { - if (claims == NULL) return NULL; - return claims->json; -} - -const char *grpc_jwt_claims_subject(const grpc_jwt_claims *claims) { - if (claims == NULL) return NULL; - return claims->sub; -} - -const char *grpc_jwt_claims_issuer(const grpc_jwt_claims *claims) { - if (claims == NULL) return NULL; - return claims->iss; -} - -const char *grpc_jwt_claims_id(const grpc_jwt_claims *claims) { - if (claims == NULL) return NULL; - return claims->jti; -} - -const char *grpc_jwt_claims_audience(const grpc_jwt_claims *claims) { - if (claims == NULL) return NULL; - return claims->aud; -} - -gpr_timespec grpc_jwt_claims_issued_at(const grpc_jwt_claims *claims) { - if (claims == NULL) return gpr_inf_past(GPR_CLOCK_REALTIME); - return claims->iat; -} - -gpr_timespec grpc_jwt_claims_expires_at(const grpc_jwt_claims *claims) { - if (claims == NULL) return gpr_inf_future(GPR_CLOCK_REALTIME); - return claims->exp; -} - -gpr_timespec grpc_jwt_claims_not_before(const grpc_jwt_claims *claims) { - if (claims == NULL) return gpr_inf_past(GPR_CLOCK_REALTIME); - return claims->nbf; -} - -/* Takes ownership of json and buffer even in case of failure. */ -grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer) { - grpc_json *cur; - grpc_jwt_claims *claims = gpr_malloc(sizeof(grpc_jwt_claims)); - memset(claims, 0, sizeof(grpc_jwt_claims)); - claims->json = json; - claims->buffer = buffer; - claims->iat = gpr_inf_past(GPR_CLOCK_REALTIME); - claims->nbf = gpr_inf_past(GPR_CLOCK_REALTIME); - claims->exp = gpr_inf_future(GPR_CLOCK_REALTIME); - - /* Per the spec, all fields are optional. */ - for (cur = json->child; cur != NULL; cur = cur->next) { - if (strcmp(cur->key, "sub") == 0) { - claims->sub = validate_string_field(cur, "sub"); - if (claims->sub == NULL) goto error; - } else if (strcmp(cur->key, "iss") == 0) { - claims->iss = validate_string_field(cur, "iss"); - if (claims->iss == NULL) goto error; - } else if (strcmp(cur->key, "aud") == 0) { - claims->aud = validate_string_field(cur, "aud"); - if (claims->aud == NULL) goto error; - } else if (strcmp(cur->key, "jti") == 0) { - claims->jti = validate_string_field(cur, "jti"); - if (claims->jti == NULL) goto error; - } else if (strcmp(cur->key, "iat") == 0) { - claims->iat = validate_time_field(cur, "iat"); - if (gpr_time_cmp(claims->iat, gpr_time_0(GPR_CLOCK_REALTIME)) == 0) - goto error; - } else if (strcmp(cur->key, "exp") == 0) { - claims->exp = validate_time_field(cur, "exp"); - if (gpr_time_cmp(claims->exp, gpr_time_0(GPR_CLOCK_REALTIME)) == 0) - goto error; - } else if (strcmp(cur->key, "nbf") == 0) { - claims->nbf = validate_time_field(cur, "nbf"); - if (gpr_time_cmp(claims->nbf, gpr_time_0(GPR_CLOCK_REALTIME)) == 0) - goto error; - } - } - return claims; - -error: - grpc_jwt_claims_destroy(claims); - return NULL; -} - -grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, - const char *audience) { - gpr_timespec skewed_now; - int audience_ok; - - GPR_ASSERT(claims != NULL); - - skewed_now = - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_clock_skew); - if (gpr_time_cmp(skewed_now, claims->nbf) < 0) { - gpr_log(GPR_ERROR, "JWT is not valid yet."); - return GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE; - } - skewed_now = - gpr_time_sub(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_clock_skew); - if (gpr_time_cmp(skewed_now, claims->exp) > 0) { - gpr_log(GPR_ERROR, "JWT is expired."); - return GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE; - } - - if (audience == NULL) { - audience_ok = claims->aud == NULL; - } else { - audience_ok = claims->aud != NULL && strcmp(audience, claims->aud) == 0; - } - if (!audience_ok) { - gpr_log(GPR_ERROR, "Audience mismatch: expected %s and found %s.", - audience == NULL ? "NULL" : audience, - claims->aud == NULL ? "NULL" : claims->aud); - return GRPC_JWT_VERIFIER_BAD_AUDIENCE; - } - return GRPC_JWT_VERIFIER_OK; -} - -/* --- verifier_cb_ctx object. --- */ - -typedef struct { - grpc_jwt_verifier *verifier; - grpc_pollset *pollset; - jose_header *header; - grpc_jwt_claims *claims; - char *audience; - gpr_slice signature; - gpr_slice signed_data; - void *user_data; - grpc_jwt_verification_done_cb user_cb; -} verifier_cb_ctx; - -/* Takes ownership of the header, claims and signature. */ -static verifier_cb_ctx *verifier_cb_ctx_create( - grpc_jwt_verifier *verifier, grpc_pollset *pollset, jose_header *header, - 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) { - verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx)); - memset(ctx, 0, sizeof(verifier_cb_ctx)); - ctx->verifier = verifier; - ctx->pollset = pollset; - ctx->header = header; - ctx->audience = gpr_strdup(audience); - ctx->claims = claims; - ctx->signature = signature; - ctx->signed_data = gpr_slice_from_copied_buffer(signed_jwt, signed_jwt_len); - ctx->user_data = user_data; - ctx->user_cb = cb; - return ctx; -} - -void verifier_cb_ctx_destroy(verifier_cb_ctx *ctx) { - if (ctx->audience != NULL) gpr_free(ctx->audience); - if (ctx->claims != NULL) grpc_jwt_claims_destroy(ctx->claims); - gpr_slice_unref(ctx->signature); - gpr_slice_unref(ctx->signed_data); - jose_header_destroy(ctx->header); - /* TODO: see what to do with claims... */ - gpr_free(ctx); -} - -/* --- grpc_jwt_verifier object. --- */ - -/* Clock skew defaults to one minute. */ -gpr_timespec grpc_jwt_verifier_clock_skew = {60, 0, GPR_TIMESPAN}; - -/* Max delay defaults to one minute. */ -gpr_timespec grpc_jwt_verifier_max_delay = {60, 0, GPR_TIMESPAN}; - -typedef struct { - char *email_domain; - char *key_url_prefix; -} email_key_mapping; - -struct grpc_jwt_verifier { - email_key_mapping *mappings; - size_t num_mappings; /* Should be very few, linear search ok. */ - size_t allocated_mappings; - grpc_httpcli_context http_ctx; -}; - -static grpc_json *json_from_http(const grpc_httpcli_response *response) { - grpc_json *json = NULL; - - if (response == NULL) { - gpr_log(GPR_ERROR, "HTTP response is NULL."); - return NULL; - } - if (response->status != 200) { - gpr_log(GPR_ERROR, "Call to http server failed with error %d.", - response->status); - return NULL; - } - - json = grpc_json_parse_string_with_len(response->body, response->body_length); - if (json == NULL) { - gpr_log(GPR_ERROR, "Invalid JSON found in response."); - } - return json; -} - -static const grpc_json *find_property_by_name(const grpc_json *json, - const char *name) { - const grpc_json *cur; - for (cur = json->child; cur != NULL; cur = cur->next) { - if (strcmp(cur->key, name) == 0) return cur; - } - return NULL; -} - -static EVP_PKEY *extract_pkey_from_x509(const char *x509_str) { - X509 *x509 = NULL; - EVP_PKEY *result = NULL; - BIO *bio = BIO_new(BIO_s_mem()); - size_t len = strlen(x509_str); - GPR_ASSERT(len < INT_MAX); - BIO_write(bio, x509_str, (int)len); - x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL); - if (x509 == NULL) { - gpr_log(GPR_ERROR, "Unable to parse x509 cert."); - goto end; - } - result = X509_get_pubkey(x509); - if (result == NULL) { - gpr_log(GPR_ERROR, "Cannot find public key in X509 cert."); - } - -end: - BIO_free(bio); - if (x509 != NULL) X509_free(x509); - return result; -} - -static BIGNUM *bignum_from_base64(const char *b64) { - BIGNUM *result = NULL; - gpr_slice bin; - - if (b64 == NULL) return NULL; - bin = grpc_base64_decode(b64, 1); - if (GPR_SLICE_IS_EMPTY(bin)) { - gpr_log(GPR_ERROR, "Invalid base64 for big num."); - return NULL; - } - result = BN_bin2bn(GPR_SLICE_START_PTR(bin), - TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL); - gpr_slice_unref(bin); - return result; -} - -static EVP_PKEY *pkey_from_jwk(const grpc_json *json, const char *kty) { - const grpc_json *key_prop; - RSA *rsa = NULL; - EVP_PKEY *result = NULL; - - GPR_ASSERT(kty != NULL && json != NULL); - if (strcmp(kty, "RSA") != 0) { - gpr_log(GPR_ERROR, "Unsupported key type %s.", kty); - goto end; - } - rsa = RSA_new(); - if (rsa == NULL) { - gpr_log(GPR_ERROR, "Could not create rsa key."); - goto end; - } - for (key_prop = json->child; key_prop != NULL; key_prop = key_prop->next) { - if (strcmp(key_prop->key, "n") == 0) { - rsa->n = bignum_from_base64(validate_string_field(key_prop, "n")); - if (rsa->n == NULL) goto end; - } else if (strcmp(key_prop->key, "e") == 0) { - rsa->e = bignum_from_base64(validate_string_field(key_prop, "e")); - if (rsa->e == NULL) goto end; - } - } - if (rsa->e == NULL || rsa->n == NULL) { - gpr_log(GPR_ERROR, "Missing RSA public key field."); - goto end; - } - result = EVP_PKEY_new(); - EVP_PKEY_set1_RSA(result, rsa); /* uprefs rsa. */ - -end: - if (rsa != NULL) RSA_free(rsa); - return result; -} - -static EVP_PKEY *find_verification_key(const grpc_json *json, - const char *header_alg, - const char *header_kid) { - const grpc_json *jkey; - const grpc_json *jwk_keys; - /* Try to parse the json as a JWK set: - https://tools.ietf.org/html/rfc7517#section-5. */ - jwk_keys = find_property_by_name(json, "keys"); - if (jwk_keys == NULL) { - /* Use the google proprietary format which is: - { : , : , ... } */ - const grpc_json *cur = find_property_by_name(json, header_kid); - if (cur == NULL) return NULL; - return extract_pkey_from_x509(cur->value); - } - - if (jwk_keys->type != GRPC_JSON_ARRAY) { - gpr_log(GPR_ERROR, - "Unexpected value type of keys property in jwks key set."); - return NULL; - } - /* Key format is specified in: - https://tools.ietf.org/html/rfc7518#section-6. */ - for (jkey = jwk_keys->child; jkey != NULL; jkey = jkey->next) { - grpc_json *key_prop; - const char *alg = NULL; - const char *kid = NULL; - const char *kty = NULL; - - if (jkey->type != GRPC_JSON_OBJECT) continue; - for (key_prop = jkey->child; key_prop != NULL; key_prop = key_prop->next) { - if (strcmp(key_prop->key, "alg") == 0 && - key_prop->type == GRPC_JSON_STRING) { - alg = key_prop->value; - } else if (strcmp(key_prop->key, "kid") == 0 && - key_prop->type == GRPC_JSON_STRING) { - kid = key_prop->value; - } else if (strcmp(key_prop->key, "kty") == 0 && - key_prop->type == GRPC_JSON_STRING) { - kty = key_prop->value; - } - } - if (alg != NULL && kid != NULL && kty != NULL && - strcmp(kid, header_kid) == 0 && strcmp(alg, header_alg) == 0) { - return pkey_from_jwk(jkey, kty); - } - } - gpr_log(GPR_ERROR, - "Could not find matching key in key set for kid=%s and alg=%s", - header_kid, header_alg); - return NULL; -} - -static int verify_jwt_signature(EVP_PKEY *key, const char *alg, - gpr_slice signature, gpr_slice signed_data) { - EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); - const EVP_MD *md = evp_md_from_alg(alg); - int result = 0; - - GPR_ASSERT(md != NULL); /* Checked before. */ - if (md_ctx == NULL) { - gpr_log(GPR_ERROR, "Could not create EVP_MD_CTX."); - goto end; - } - if (EVP_DigestVerifyInit(md_ctx, NULL, md, NULL, key) != 1) { - gpr_log(GPR_ERROR, "EVP_DigestVerifyInit failed."); - goto end; - } - if (EVP_DigestVerifyUpdate(md_ctx, GPR_SLICE_START_PTR(signed_data), - GPR_SLICE_LENGTH(signed_data)) != 1) { - gpr_log(GPR_ERROR, "EVP_DigestVerifyUpdate failed."); - goto end; - } - if (EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(signature), - GPR_SLICE_LENGTH(signature)) != 1) { - gpr_log(GPR_ERROR, "JWT signature verification failed."); - goto end; - } - result = 1; - -end: - if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx); - return result; -} - -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); - verifier_cb_ctx *ctx = (verifier_cb_ctx *)user_data; - EVP_PKEY *verification_key = NULL; - grpc_jwt_verifier_status status = GRPC_JWT_VERIFIER_GENERIC_ERROR; - grpc_jwt_claims *claims = NULL; - - if (json == NULL) { - status = GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR; - goto end; - } - verification_key = - find_verification_key(json, ctx->header->alg, ctx->header->kid); - if (verification_key == NULL) { - gpr_log(GPR_ERROR, "Could not find verification key with kid %s.", - ctx->header->kid); - status = GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR; - goto end; - } - - if (!verify_jwt_signature(verification_key, ctx->header->alg, ctx->signature, - ctx->signed_data)) { - status = GRPC_JWT_VERIFIER_BAD_SIGNATURE; - goto end; - } - - status = grpc_jwt_claims_check(ctx->claims, ctx->audience); - if (status == GRPC_JWT_VERIFIER_OK) { - /* Pass ownership. */ - claims = ctx->claims; - ctx->claims = NULL; - } - -end: - if (json != NULL) grpc_json_destroy(json); - if (verification_key != NULL) EVP_PKEY_free(verification_key); - ctx->user_cb(ctx->user_data, status, claims); - verifier_cb_ctx_destroy(ctx); -} - -static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_httpcli_response *response) { - const grpc_json *cur; - grpc_json *json = json_from_http(response); - verifier_cb_ctx *ctx = (verifier_cb_ctx *)user_data; - grpc_httpcli_request req; - const char *jwks_uri; - - /* TODO(jboeuf): Cache the jwks_uri in order to avoid this hop next time. */ - if (json == NULL) goto error; - cur = find_property_by_name(json, "jwks_uri"); - if (cur == NULL) { - gpr_log(GPR_ERROR, "Could not find jwks_uri in openid config."); - goto error; - } - jwks_uri = validate_string_field(cur, "jwks_uri"); - if (jwks_uri == NULL) goto error; - if (strstr(jwks_uri, "https://") != jwks_uri) { - gpr_log(GPR_ERROR, "Invalid non https jwks_uri: %s.", jwks_uri); - goto error; - } - jwks_uri += 8; - req.handshaker = &grpc_httpcli_ssl; - req.host = gpr_strdup(jwks_uri); - req.http.path = strchr(jwks_uri, '/'); - if (req.http.path == NULL) { - req.http.path = ""; - } else { - *(req.host + (req.http.path - jwks_uri)) = '\0'; - } - 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_json_destroy(json); - gpr_free(req.host); - return; - -error: - if (json != NULL) grpc_json_destroy(json); - ctx->user_cb(ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, NULL); - verifier_cb_ctx_destroy(ctx); -} - -static email_key_mapping *verifier_get_mapping(grpc_jwt_verifier *v, - const char *email_domain) { - size_t i; - if (v->mappings == NULL) return NULL; - for (i = 0; i < v->num_mappings; i++) { - if (strcmp(email_domain, v->mappings[i].email_domain) == 0) { - return &v->mappings[i]; - } - } - return NULL; -} - -static void verifier_put_mapping(grpc_jwt_verifier *v, const char *email_domain, - const char *key_url_prefix) { - email_key_mapping *mapping = verifier_get_mapping(v, email_domain); - GPR_ASSERT(v->num_mappings < v->allocated_mappings); - if (mapping != NULL) { - gpr_free(mapping->key_url_prefix); - mapping->key_url_prefix = gpr_strdup(key_url_prefix); - return; - } - v->mappings[v->num_mappings].email_domain = gpr_strdup(email_domain); - v->mappings[v->num_mappings].key_url_prefix = gpr_strdup(key_url_prefix); - v->num_mappings++; - GPR_ASSERT(v->num_mappings <= v->allocated_mappings); -} - -/* Takes ownership of ctx. */ -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; - char *path_prefix = NULL; - const char *iss; - grpc_httpcli_request req; - memset(&req, 0, sizeof(grpc_httpcli_request)); - req.handshaker = &grpc_httpcli_ssl; - - GPR_ASSERT(ctx != NULL && ctx->header != NULL && ctx->claims != NULL); - iss = ctx->claims->iss; - if (ctx->header->kid == NULL) { - gpr_log(GPR_ERROR, "Missing kid in jose header."); - goto error; - } - if (iss == NULL) { - gpr_log(GPR_ERROR, "Missing iss in claims."); - goto error; - } - - /* This code relies on: - https://openid.net/specs/openid-connect-discovery-1_0.html - Nobody seems to implement the account/email/webfinger part 2. of the spec - so we will rely instead on email/url mappings if we detect such an issuer. - Part 4, on the other hand is implemented by both google and salesforce. */ - - /* Very non-sophisticated way to detect an email address. Should be good - enough for now... */ - at_sign = strchr(iss, '@'); - if (at_sign != NULL) { - email_key_mapping *mapping; - const char *email_domain = at_sign + 1; - GPR_ASSERT(ctx->verifier != NULL); - mapping = verifier_get_mapping(ctx->verifier, email_domain); - if (mapping == NULL) { - gpr_log(GPR_ERROR, "Missing mapping for issuer email."); - goto error; - } - req.host = gpr_strdup(mapping->key_url_prefix); - path_prefix = strchr(req.host, '/'); - if (path_prefix == NULL) { - gpr_asprintf(&req.http.path, "/%s", iss); - } else { - *(path_prefix++) = '\0'; - gpr_asprintf(&req.http.path, "/%s/%s", path_prefix, iss); - } - http_cb = on_keys_retrieved; - } else { - req.host = gpr_strdup(strstr(iss, "https://") == iss ? iss + 8 : iss); - path_prefix = strchr(req.host, '/'); - if (path_prefix == NULL) { - req.http.path = gpr_strdup(GRPC_OPENID_CONFIG_URL_SUFFIX); - } else { - *(path_prefix++) = 0; - gpr_asprintf(&req.http.path, "/%s%s", path_prefix, - GRPC_OPENID_CONFIG_URL_SUFFIX); - } - http_cb = on_openid_config_retrieved; - } - - 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); - gpr_free(req.host); - gpr_free(req.http.path); - return; - -error: - ctx->user_cb(ctx->user_data, GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, NULL); - verifier_cb_ctx_destroy(ctx); -} - -void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, - grpc_jwt_verifier *verifier, - grpc_pollset *pollset, const char *jwt, - const char *audience, - grpc_jwt_verification_done_cb cb, - void *user_data) { - const char *dot = NULL; - grpc_json *json; - jose_header *header = NULL; - grpc_jwt_claims *claims = NULL; - gpr_slice header_buffer; - gpr_slice claims_buffer; - gpr_slice signature; - size_t signed_jwt_len; - const char *cur = jwt; - - GPR_ASSERT(verifier != NULL && jwt != NULL && audience != NULL && cb != NULL); - dot = strchr(cur, '.'); - if (dot == NULL) goto error; - json = parse_json_part_from_jwt(cur, (size_t)(dot - cur), &header_buffer); - if (json == NULL) goto error; - header = jose_header_from_json(json, header_buffer); - if (header == NULL) goto error; - - cur = dot + 1; - dot = strchr(cur, '.'); - if (dot == NULL) goto error; - json = parse_json_part_from_jwt(cur, (size_t)(dot - cur), &claims_buffer); - if (json == NULL) goto error; - claims = grpc_jwt_claims_from_json(json, claims_buffer); - if (claims == NULL) goto error; - - signed_jwt_len = (size_t)(dot - jwt); - cur = dot + 1; - signature = grpc_base64_decode(cur, 1); - if (GPR_SLICE_IS_EMPTY(signature)) goto error; - retrieve_key_and_verify( - exec_ctx, - verifier_cb_ctx_create(verifier, pollset, header, claims, audience, - signature, jwt, signed_jwt_len, user_data, cb)); - return; - -error: - if (header != NULL) jose_header_destroy(header); - if (claims != NULL) grpc_jwt_claims_destroy(claims); - cb(user_data, GRPC_JWT_VERIFIER_BAD_FORMAT, NULL); -} - -grpc_jwt_verifier *grpc_jwt_verifier_create( - const grpc_jwt_verifier_email_domain_key_url_mapping *mappings, - size_t num_mappings) { - grpc_jwt_verifier *v = gpr_malloc(sizeof(grpc_jwt_verifier)); - memset(v, 0, sizeof(grpc_jwt_verifier)); - grpc_httpcli_context_init(&v->http_ctx); - - /* We know at least of one mapping. */ - v->allocated_mappings = 1 + num_mappings; - v->mappings = gpr_malloc(v->allocated_mappings * sizeof(email_key_mapping)); - verifier_put_mapping(v, GRPC_GOOGLE_SERVICE_ACCOUNTS_EMAIL_DOMAIN, - GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX); - /* User-Provided mappings. */ - if (mappings != NULL) { - size_t i; - for (i = 0; i < num_mappings; i++) { - verifier_put_mapping(v, mappings[i].email_domain, - mappings[i].key_url_prefix); - } - } - return v; -} - -void grpc_jwt_verifier_destroy(grpc_jwt_verifier *v) { - size_t i; - if (v == NULL) return; - grpc_httpcli_context_destroy(&v->http_ctx); - if (v->mappings != NULL) { - for (i = 0; i < v->num_mappings; i++) { - gpr_free(v->mappings[i].email_domain); - gpr_free(v->mappings[i].key_url_prefix); - } - gpr_free(v->mappings); - } - gpr_free(v); -} diff --git a/src/core/lib/security/jwt_verifier.h b/src/core/lib/security/jwt_verifier.h deleted file mode 100644 index 98a4f6b116..0000000000 --- a/src/core/lib/security/jwt_verifier.h +++ /dev/null @@ -1,136 +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_SECURITY_JWT_VERIFIER_H -#define GRPC_CORE_LIB_SECURITY_JWT_VERIFIER_H - -#include "src/core/lib/iomgr/pollset.h" -#include "src/core/lib/json/json.h" - -#include -#include - -/* --- Constants. --- */ - -#define GRPC_OPENID_CONFIG_URL_SUFFIX "/.well-known/openid-configuration" -#define GRPC_GOOGLE_SERVICE_ACCOUNTS_EMAIL_DOMAIN \ - "developer.gserviceaccount.com" -#define GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX \ - "www.googleapis.com/robot/v1/metadata/x509" - -/* --- grpc_jwt_verifier_status. --- */ - -typedef enum { - GRPC_JWT_VERIFIER_OK = 0, - GRPC_JWT_VERIFIER_BAD_SIGNATURE, - GRPC_JWT_VERIFIER_BAD_FORMAT, - GRPC_JWT_VERIFIER_BAD_AUDIENCE, - GRPC_JWT_VERIFIER_KEY_RETRIEVAL_ERROR, - GRPC_JWT_VERIFIER_TIME_CONSTRAINT_FAILURE, - GRPC_JWT_VERIFIER_GENERIC_ERROR -} grpc_jwt_verifier_status; - -const char *grpc_jwt_verifier_status_to_string(grpc_jwt_verifier_status status); - -/* --- grpc_jwt_claims. --- */ - -typedef struct grpc_jwt_claims grpc_jwt_claims; - -void grpc_jwt_claims_destroy(grpc_jwt_claims *claims); - -/* Returns the whole JSON tree of the claims. */ -const grpc_json *grpc_jwt_claims_json(const grpc_jwt_claims *claims); - -/* Access to registered claims in https://tools.ietf.org/html/rfc7519#page-9 */ -const char *grpc_jwt_claims_subject(const grpc_jwt_claims *claims); -const char *grpc_jwt_claims_issuer(const grpc_jwt_claims *claims); -const char *grpc_jwt_claims_id(const grpc_jwt_claims *claims); -const char *grpc_jwt_claims_audience(const grpc_jwt_claims *claims); -gpr_timespec grpc_jwt_claims_issued_at(const grpc_jwt_claims *claims); -gpr_timespec grpc_jwt_claims_expires_at(const grpc_jwt_claims *claims); -gpr_timespec grpc_jwt_claims_not_before(const grpc_jwt_claims *claims); - -/* --- grpc_jwt_verifier. --- */ - -typedef struct grpc_jwt_verifier grpc_jwt_verifier; - -typedef struct { - /* The email domain is the part after the @ sign. */ - const char *email_domain; - - /* The key url prefix will be used to get the public key from the issuer: - https:/// - Therefore the key_url_prefix must NOT contain https://. */ - const char *key_url_prefix; -} grpc_jwt_verifier_email_domain_key_url_mapping; - -/* Globals to control the verifier. Not thread-safe. */ -extern gpr_timespec grpc_jwt_verifier_clock_skew; -extern gpr_timespec grpc_jwt_verifier_max_delay; - -/* The verifier can be created with some custom mappings to help with key - discovery in the case where the issuer is an email address. - mappings can be NULL in which case num_mappings MUST be 0. - A verifier object has one built-in mapping (unless overridden): - GRPC_GOOGLE_SERVICE_ACCOUNTS_EMAIL_DOMAIN -> - GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX.*/ -grpc_jwt_verifier *grpc_jwt_verifier_create( - const grpc_jwt_verifier_email_domain_key_url_mapping *mappings, - size_t num_mappings); - -/*The verifier must not be destroyed if there are still outstanding callbacks.*/ -void grpc_jwt_verifier_destroy(grpc_jwt_verifier *verifier); - -/* User provided callback that will be called when the verification of the JWT - is done (maybe in another thread). - It is the responsibility of the callee to call grpc_jwt_claims_destroy on - the claims. */ -typedef void (*grpc_jwt_verification_done_cb)(void *user_data, - grpc_jwt_verifier_status status, - grpc_jwt_claims *claims); - -/* Verifies for the JWT for the given expected audience. */ -void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, - grpc_jwt_verifier *verifier, - grpc_pollset *pollset, const char *jwt, - const char *audience, - grpc_jwt_verification_done_cb cb, - void *user_data); - -/* --- TESTING ONLY exposed functions. --- */ - -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 */ diff --git a/src/core/lib/security/secure_endpoint.c b/src/core/lib/security/secure_endpoint.c deleted file mode 100644 index 27b0e98910..0000000000 --- a/src/core/lib/security/secure_endpoint.c +++ /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. - * - */ - -#include "src/core/lib/security/secure_endpoint.h" -#include -#include -#include -#include -#include -#include "src/core/lib/debug/trace.h" -#include "src/core/lib/support/string.h" -#include "src/core/lib/tsi/transport_security_interface.h" - -#define STAGING_BUFFER_SIZE 8192 - -typedef struct { - grpc_endpoint base; - grpc_endpoint *wrapped_ep; - struct tsi_frame_protector *protector; - gpr_mu protector_mu; - /* saved upper level callbacks and user_data. */ - grpc_closure *read_cb; - grpc_closure *write_cb; - grpc_closure on_read; - gpr_slice_buffer *read_buffer; - gpr_slice_buffer source_buffer; - /* saved handshaker leftover data to unprotect. */ - gpr_slice_buffer leftover_bytes; - /* buffers for read and write */ - gpr_slice read_staging_buffer; - - gpr_slice write_staging_buffer; - gpr_slice_buffer output_buffer; - - gpr_refcount ref; -} secure_endpoint; - -int grpc_trace_secure_endpoint = 0; - -static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) { - secure_endpoint *ep = secure_ep; - grpc_endpoint_destroy(exec_ctx, ep->wrapped_ep); - tsi_frame_protector_destroy(ep->protector); - gpr_slice_buffer_destroy(&ep->leftover_bytes); - gpr_slice_unref(ep->read_staging_buffer); - gpr_slice_unref(ep->write_staging_buffer); - gpr_slice_buffer_destroy(&ep->output_buffer); - gpr_slice_buffer_destroy(&ep->source_buffer); - gpr_mu_destroy(&ep->protector_mu); - gpr_free(ep); -} - -/*#define GRPC_SECURE_ENDPOINT_REFCOUNT_DEBUG*/ -#ifdef GRPC_SECURE_ENDPOINT_REFCOUNT_DEBUG -#define SECURE_ENDPOINT_UNREF(exec_ctx, ep, reason) \ - secure_endpoint_unref((exec_ctx), (ep), (reason), __FILE__, __LINE__) -#define SECURE_ENDPOINT_REF(ep, reason) \ - secure_endpoint_ref((ep), (reason), __FILE__, __LINE__) -static void secure_endpoint_unref(secure_endpoint *ep, - grpc_closure_list *closure_list, - const char *reason, const char *file, - int line) { - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "SECENDP unref %p : %s %d -> %d", - ep, reason, ep->ref.count, ep->ref.count - 1); - if (gpr_unref(&ep->ref)) { - destroy(exec_ctx, ep); - } -} - -static void secure_endpoint_ref(secure_endpoint *ep, const char *reason, - const char *file, int line) { - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "SECENDP ref %p : %s %d -> %d", - ep, reason, ep->ref.count, ep->ref.count + 1); - gpr_ref(&ep->ref); -} -#else -#define SECURE_ENDPOINT_UNREF(exec_ctx, ep, reason) \ - secure_endpoint_unref((exec_ctx), (ep)) -#define SECURE_ENDPOINT_REF(ep, reason) secure_endpoint_ref((ep)) -static void secure_endpoint_unref(grpc_exec_ctx *exec_ctx, - secure_endpoint *ep) { - if (gpr_unref(&ep->ref)) { - destroy(exec_ctx, ep); - } -} - -static void secure_endpoint_ref(secure_endpoint *ep) { gpr_ref(&ep->ref); } -#endif - -static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, - uint8_t **end) { - gpr_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); - ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); - *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); -} - -static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, - bool success) { - if (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], - GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "READ %p: %s", ep, data); - gpr_free(data); - } - } - ep->read_buffer = NULL; - grpc_exec_ctx_enqueue(exec_ctx, ep->read_cb, success, NULL); - SECURE_ENDPOINT_UNREF(exec_ctx, ep, "read"); -} - -static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { - unsigned i; - uint8_t keep_looping = 0; - tsi_result result = TSI_OK; - secure_endpoint *ep = (secure_endpoint *)user_data; - uint8_t *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); - uint8_t *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); - - if (!success) { - gpr_slice_buffer_reset_and_unref(ep->read_buffer); - call_read_cb(exec_ctx, ep, 0); - return; - } - - /* TODO(yangg) check error, maybe bail out early */ - for (i = 0; i < ep->source_buffer.count; i++) { - gpr_slice encrypted = ep->source_buffer.slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(encrypted); - size_t message_size = GPR_SLICE_LENGTH(encrypted); - - while (message_size > 0 || keep_looping) { - size_t unprotected_buffer_size_written = (size_t)(end - cur); - size_t processed_message_size = message_size; - gpr_mu_lock(&ep->protector_mu); - result = tsi_frame_protector_unprotect(ep->protector, message_bytes, - &processed_message_size, cur, - &unprotected_buffer_size_written); - gpr_mu_unlock(&ep->protector_mu); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Decryption error: %s", - tsi_result_to_string(result)); - break; - } - message_bytes += processed_message_size; - message_size -= processed_message_size; - cur += unprotected_buffer_size_written; - - if (cur == end) { - flush_read_staging_buffer(ep, &cur, &end); - /* Force to enter the loop again to extract buffered bytes in protector. - The bytes could be buffered because of running out of staging_buffer. - If this happens at the end of all slices, doing another unprotect - avoids leaving data in the protector. */ - keep_looping = 1; - } else if (unprotected_buffer_size_written > 0) { - keep_looping = 1; - } else { - keep_looping = 0; - } - } - if (result != TSI_OK) break; - } - - if (cur != GPR_SLICE_START_PTR(ep->read_staging_buffer)) { - gpr_slice_buffer_add( - ep->read_buffer, - gpr_slice_split_head( - &ep->read_staging_buffer, - (size_t)(cur - GPR_SLICE_START_PTR(ep->read_staging_buffer)))); - } - - /* TODO(yangg) experiment with moving this block after read_cb to see if it - helps latency */ - gpr_slice_buffer_reset_and_unref(&ep->source_buffer); - - if (result != TSI_OK) { - gpr_slice_buffer_reset_and_unref(ep->read_buffer); - call_read_cb(exec_ctx, ep, 0); - return; - } - - call_read_cb(exec_ctx, ep, 1); -} - -static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, - gpr_slice_buffer *slices, grpc_closure *cb) { - secure_endpoint *ep = (secure_endpoint *)secure_ep; - ep->read_cb = cb; - ep->read_buffer = slices; - gpr_slice_buffer_reset_and_unref(ep->read_buffer); - - SECURE_ENDPOINT_REF(ep, "read"); - 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); - return; - } - - grpc_endpoint_read(exec_ctx, ep->wrapped_ep, &ep->source_buffer, - &ep->on_read); -} - -static void flush_write_staging_buffer(secure_endpoint *ep, uint8_t **cur, - uint8_t **end) { - gpr_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); - ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); - *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); -} - -static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, - gpr_slice_buffer *slices, grpc_closure *cb) { - unsigned i; - tsi_result result = TSI_OK; - secure_endpoint *ep = (secure_endpoint *)secure_ep; - uint8_t *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); - uint8_t *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); - - gpr_slice_buffer_reset_and_unref(&ep->output_buffer); - - if (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); - gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data); - gpr_free(data); - } - } - - for (i = 0; i < slices->count; i++) { - gpr_slice plain = slices->slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); - size_t message_size = GPR_SLICE_LENGTH(plain); - while (message_size > 0) { - size_t protected_buffer_size_to_send = (size_t)(end - cur); - size_t processed_message_size = message_size; - gpr_mu_lock(&ep->protector_mu); - result = tsi_frame_protector_protect(ep->protector, message_bytes, - &processed_message_size, cur, - &protected_buffer_size_to_send); - gpr_mu_unlock(&ep->protector_mu); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Encryption error: %s", - tsi_result_to_string(result)); - break; - } - message_bytes += processed_message_size; - message_size -= processed_message_size; - cur += protected_buffer_size_to_send; - - if (cur == end) { - flush_write_staging_buffer(ep, &cur, &end); - } - } - if (result != TSI_OK) break; - } - if (result == TSI_OK) { - size_t still_pending_size; - do { - size_t protected_buffer_size_to_send = (size_t)(end - cur); - gpr_mu_lock(&ep->protector_mu); - result = tsi_frame_protector_protect_flush(ep->protector, cur, - &protected_buffer_size_to_send, - &still_pending_size); - gpr_mu_unlock(&ep->protector_mu); - if (result != TSI_OK) break; - cur += protected_buffer_size_to_send; - if (cur == end) { - flush_write_staging_buffer(ep, &cur, &end); - } - } while (still_pending_size > 0); - if (cur != GPR_SLICE_START_PTR(ep->write_staging_buffer)) { - gpr_slice_buffer_add( - &ep->output_buffer, - gpr_slice_split_head( - &ep->write_staging_buffer, - (size_t)(cur - GPR_SLICE_START_PTR(ep->write_staging_buffer)))); - } - } - - 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); - return; - } - - grpc_endpoint_write(exec_ctx, ep->wrapped_ep, &ep->output_buffer, cb); -} - -static void endpoint_shutdown(grpc_exec_ctx *exec_ctx, - grpc_endpoint *secure_ep) { - secure_endpoint *ep = (secure_endpoint *)secure_ep; - grpc_endpoint_shutdown(exec_ctx, ep->wrapped_ep); -} - -static void endpoint_destroy(grpc_exec_ctx *exec_ctx, - grpc_endpoint *secure_ep) { - secure_endpoint *ep = (secure_endpoint *)secure_ep; - SECURE_ENDPOINT_UNREF(exec_ctx, ep, "destroy"); -} - -static void endpoint_add_to_pollset(grpc_exec_ctx *exec_ctx, - grpc_endpoint *secure_ep, - grpc_pollset *pollset) { - secure_endpoint *ep = (secure_endpoint *)secure_ep; - grpc_endpoint_add_to_pollset(exec_ctx, ep->wrapped_ep, pollset); -} - -static void endpoint_add_to_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_endpoint *secure_ep, - grpc_pollset_set *pollset_set) { - secure_endpoint *ep = (secure_endpoint *)secure_ep; - grpc_endpoint_add_to_pollset_set(exec_ctx, ep->wrapped_ep, pollset_set); -} - -static char *endpoint_get_peer(grpc_endpoint *secure_ep) { - secure_endpoint *ep = (secure_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}; - -grpc_endpoint *grpc_secure_endpoint_create( - struct tsi_frame_protector *protector, grpc_endpoint *transport, - gpr_slice *leftover_slices, size_t leftover_nslices) { - size_t i; - secure_endpoint *ep = (secure_endpoint *)gpr_malloc(sizeof(secure_endpoint)); - ep->base.vtable = &vtable; - ep->wrapped_ep = transport; - ep->protector = protector; - gpr_slice_buffer_init(&ep->leftover_bytes); - for (i = 0; i < leftover_nslices; i++) { - gpr_slice_buffer_add(&ep->leftover_bytes, - gpr_slice_ref(leftover_slices[i])); - } - ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - gpr_slice_buffer_init(&ep->output_buffer); - gpr_slice_buffer_init(&ep->source_buffer); - ep->read_buffer = NULL; - grpc_closure_init(&ep->on_read, on_read, ep); - gpr_mu_init(&ep->protector_mu); - gpr_ref_init(&ep->ref, 1); - return &ep->base; -} diff --git a/src/core/lib/security/secure_endpoint.h b/src/core/lib/security/secure_endpoint.h deleted file mode 100644 index ff1c6639de..0000000000 --- a/src/core/lib/security/secure_endpoint.h +++ /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. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H -#define GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H - -#include -#include "src/core/lib/iomgr/endpoint.h" - -struct tsi_frame_protector; - -extern int grpc_trace_secure_endpoint; - -/* Takes ownership of protector and to_wrap, and refs leftover_slices. */ -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 */ diff --git a/src/core/lib/security/security_connector.c b/src/core/lib/security/security_connector.c deleted file mode 100644 index 2d2023bdf5..0000000000 --- a/src/core/lib/security/security_connector.c +++ /dev/null @@ -1,838 +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/security_connector.h" - -#include -#include - -#include -#include -#include -#include -#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/support/env.h" -#include "src/core/lib/support/load_file.h" -#include "src/core/lib/support/string.h" -#include "src/core/lib/tsi/fake_transport_security.h" -#include "src/core/lib/tsi/ssl_transport_security.h" - -/* -- Constants. -- */ - -#ifndef INSTALL_PREFIX -static const char *installed_roots_path = "/usr/share/grpc/roots.pem"; -#else -static const char *installed_roots_path = - INSTALL_PREFIX "/share/grpc/roots.pem"; -#endif - -/* -- Overridden default roots. -- */ - -static grpc_ssl_roots_override_callback ssl_roots_override_cb = NULL; - -void grpc_set_ssl_roots_override_callback(grpc_ssl_roots_override_callback cb) { - ssl_roots_override_cb = cb; -} - -/* -- Cipher suites. -- */ - -/* Defines the cipher suites that we accept by default. All these cipher suites - are compliant with HTTP2. */ -#define GRPC_SSL_CIPHER_SUITES \ - "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" \ - "SHA384:ECDHE-RSA-AES256-GCM-SHA384" - -static gpr_once cipher_suites_once = GPR_ONCE_INIT; -static const char *cipher_suites = NULL; - -static void init_cipher_suites(void) { - char *overridden = gpr_getenv("GRPC_SSL_CIPHER_SUITES"); - cipher_suites = overridden != NULL ? overridden : GRPC_SSL_CIPHER_SUITES; -} - -static const char *ssl_cipher_suites(void) { - gpr_once_init(&cipher_suites_once, init_cipher_suites); - return cipher_suites; -} - -/* -- Common methods. -- */ - -/* Returns the first property with that name. */ -const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer, - const char *name) { - size_t i; - if (peer == NULL) return NULL; - for (i = 0; i < peer->property_count; i++) { - const tsi_peer_property *property = &peer->properties[i]; - if (name == NULL && property->name == NULL) { - return property; - } - if (name != NULL && property->name != NULL && - strcmp(property->name, name) == 0) { - return property; - } - } - return NULL; -} - -void grpc_server_security_connector_shutdown( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector) { - grpc_security_connector_handshake_list *tmp; - gpr_mu_lock(&connector->mu); - while (connector->handshaking_handshakes) { - tmp = connector->handshaking_handshakes; - grpc_security_handshake_shutdown( - exec_ctx, connector->handshaking_handshakes->handshake); - connector->handshaking_handshakes = tmp->next; - gpr_free(tmp); - } - gpr_mu_unlock(&connector->mu); -} - -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) { - 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); - } -} - -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) { - 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); - } -} - -void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx, - grpc_security_connector *sc, - tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { - if (sc == NULL) { - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL); - tsi_peer_destruct(&peer); - } else { - sc->vtable->check_peer(exec_ctx, sc, peer, cb, user_data); - } -} - -void grpc_channel_security_connector_check_call_host( - grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - const char *host, grpc_auth_context *auth_context, - grpc_security_call_host_check_cb cb, void *user_data) { - if (sc == NULL || sc->check_call_host == NULL) { - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR); - } else { - sc->check_call_host(exec_ctx, sc, host, auth_context, cb, user_data); - } -} - -#ifdef GRPC_SECURITY_CONNECTOR_REFCOUNT_DEBUG -grpc_security_connector *grpc_security_connector_ref( - grpc_security_connector *sc, const char *file, int line, - const char *reason) { - if (sc == NULL) return NULL; - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "SECURITY_CONNECTOR:%p ref %d -> %d %s", sc, - (int)sc->refcount.count, (int)sc->refcount.count + 1, reason); -#else -grpc_security_connector *grpc_security_connector_ref( - grpc_security_connector *sc) { - if (sc == NULL) return NULL; -#endif - gpr_ref(&sc->refcount); - return sc; -} - -#ifdef GRPC_SECURITY_CONNECTOR_REFCOUNT_DEBUG -void grpc_security_connector_unref(grpc_security_connector *sc, - const char *file, int line, - const char *reason) { - if (sc == NULL) return; - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "SECURITY_CONNECTOR:%p unref %d -> %d %s", sc, - (int)sc->refcount.count, (int)sc->refcount.count - 1, reason); -#else -void grpc_security_connector_unref(grpc_security_connector *sc) { - if (sc == NULL) return; -#endif - if (gpr_unref(&sc->refcount)) sc->vtable->destroy(sc); -} - -static void connector_pointer_arg_destroy(void *p) { - GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg"); -} - -static void *connector_pointer_arg_copy(void *p) { - return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg"); -} - -static int connector_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); } - -static const grpc_arg_pointer_vtable connector_pointer_vtable = { - connector_pointer_arg_copy, connector_pointer_arg_destroy, - connector_pointer_cmp}; - -grpc_arg grpc_security_connector_to_arg(grpc_security_connector *sc) { - grpc_arg result; - result.type = GRPC_ARG_POINTER; - result.key = GRPC_SECURITY_CONNECTOR_ARG; - result.value.pointer.vtable = &connector_pointer_vtable; - result.value.pointer.p = sc; - return result; -} - -grpc_security_connector *grpc_security_connector_from_arg(const grpc_arg *arg) { - if (strcmp(arg->key, GRPC_SECURITY_CONNECTOR_ARG)) return NULL; - if (arg->type != GRPC_ARG_POINTER) { - gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, - GRPC_SECURITY_CONNECTOR_ARG); - return NULL; - } - return arg->value.pointer.p; -} - -grpc_security_connector *grpc_find_security_connector_in_args( - const grpc_channel_args *args) { - size_t i; - if (args == NULL) return NULL; - for (i = 0; i < args->num_args; i++) { - grpc_security_connector *sc = - grpc_security_connector_from_arg(&args->args[i]); - if (sc != NULL) return sc; - } - return NULL; -} - -/* -- Fake implementation. -- */ - -static void fake_channel_destroy(grpc_security_connector *sc) { - grpc_channel_security_connector *c = (grpc_channel_security_connector *)sc; - grpc_call_credentials_unref(c->request_metadata_creds); - gpr_free(sc); -} - -static void fake_server_destroy(grpc_security_connector *sc) { - grpc_server_security_connector *c = (grpc_server_security_connector *)sc; - gpr_mu_destroy(&c->mu); - gpr_free(sc); -} - -static void fake_check_peer(grpc_exec_ctx *exec_ctx, - grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, void *user_data) { - const char *prop_name; - grpc_security_status status = GRPC_SECURITY_OK; - grpc_auth_context *auth_context = NULL; - if (peer.property_count != 1) { - gpr_log(GPR_ERROR, "Fake peers should only have 1 property."); - status = GRPC_SECURITY_ERROR; - goto end; - } - prop_name = peer.properties[0].name; - if (prop_name == NULL || - strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY)) { - gpr_log(GPR_ERROR, "Unexpected property in fake peer: %s.", - prop_name == NULL ? "" : prop_name); - status = GRPC_SECURITY_ERROR; - goto end; - } - if (strncmp(peer.properties[0].value.data, TSI_FAKE_CERTIFICATE_TYPE, - peer.properties[0].value.length)) { - gpr_log(GPR_ERROR, "Invalid value for cert type property."); - status = GRPC_SECURITY_ERROR; - goto end; - } - auth_context = grpc_auth_context_create(NULL); - grpc_auth_context_add_cstring_property( - auth_context, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, - GRPC_FAKE_TRANSPORT_SECURITY_TYPE); - -end: - cb(exec_ctx, user_data, status, auth_context); - grpc_auth_context_unref(auth_context); - tsi_peer_destruct(&peer); -} - -static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - const char *host, - grpc_auth_context *auth_context, - grpc_security_call_host_check_cb cb, - void *user_data) { - cb(exec_ctx, user_data, GRPC_SECURITY_OK); -} - -static void fake_channel_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_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(1), &sc->base, - true, nonsecure_endpoint, 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, - 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); -} - -static grpc_security_connector_vtable fake_channel_vtable = { - fake_channel_destroy, fake_check_peer}; - -static grpc_security_connector_vtable fake_server_vtable = {fake_server_destroy, - fake_check_peer}; - -grpc_channel_security_connector *grpc_fake_channel_security_connector_create( - grpc_call_credentials *request_metadata_creds) { - grpc_channel_security_connector *c = gpr_malloc(sizeof(*c)); - memset(c, 0, sizeof(*c)); - gpr_ref_init(&c->base.refcount, 1); - c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; - c->base.vtable = &fake_channel_vtable; - c->request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds); - c->check_call_host = fake_channel_check_call_host; - c->do_handshake = fake_channel_do_handshake; - return c; -} - -grpc_server_security_connector *grpc_fake_server_security_connector_create( - void) { - grpc_server_security_connector *c = - gpr_malloc(sizeof(grpc_server_security_connector)); - memset(c, 0, sizeof(*c)); - gpr_ref_init(&c->base.refcount, 1); - c->base.vtable = &fake_server_vtable; - c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; - c->do_handshake = fake_server_do_handshake; - gpr_mu_init(&c->mu); - return c; -} - -/* --- Ssl implementation. --- */ - -typedef struct { - grpc_channel_security_connector base; - tsi_ssl_handshaker_factory *handshaker_factory; - char *target_name; - char *overridden_target_name; -} grpc_ssl_channel_security_connector; - -typedef struct { - grpc_server_security_connector base; - tsi_ssl_handshaker_factory *handshaker_factory; -} grpc_ssl_server_security_connector; - -static void ssl_channel_destroy(grpc_security_connector *sc) { - grpc_ssl_channel_security_connector *c = - (grpc_ssl_channel_security_connector *)sc; - grpc_call_credentials_unref(c->base.request_metadata_creds); - if (c->handshaker_factory != NULL) { - tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); - } - if (c->target_name != NULL) gpr_free(c->target_name); - if (c->overridden_target_name != NULL) gpr_free(c->overridden_target_name); - gpr_free(sc); -} - -static void ssl_server_destroy(grpc_security_connector *sc) { - grpc_ssl_server_security_connector *c = - (grpc_ssl_server_security_connector *)sc; - - if (c->handshaker_factory != NULL) { - tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); - } - gpr_mu_destroy(&c->base.mu); - gpr_free(sc); -} - -static grpc_security_status ssl_create_handshaker( - tsi_ssl_handshaker_factory *handshaker_factory, bool is_client, - const char *peer_name, tsi_handshaker **handshaker) { - tsi_result result = TSI_OK; - if (handshaker_factory == NULL) return GRPC_SECURITY_ERROR; - result = tsi_ssl_handshaker_factory_create_handshaker( - handshaker_factory, is_client ? peer_name : NULL, handshaker); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", - tsi_result_to_string(result)); - return GRPC_SECURITY_ERROR; - } - return GRPC_SECURITY_OK; -} - -static void ssl_channel_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_ssl_channel_security_connector *c = - (grpc_ssl_channel_security_connector *)sc; - tsi_handshaker *handshaker; - grpc_security_status status = ssl_create_handshaker( - c->handshaker_factory, true, - c->overridden_target_name != NULL ? c->overridden_target_name - : c->target_name, - &handshaker); - if (status != GRPC_SECURITY_OK) { - cb(exec_ctx, user_data, status, NULL, NULL); - } else { - grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, - nonsecure_endpoint, cb, user_data); - } -} - -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, - grpc_security_handshake_done_cb cb, - void *user_data) { - grpc_ssl_server_security_connector *c = - (grpc_ssl_server_security_connector *)sc; - tsi_handshaker *handshaker; - grpc_security_status status = - ssl_create_handshaker(c->handshaker_factory, false, NULL, &handshaker); - if (status != GRPC_SECURITY_OK) { - cb(exec_ctx, user_data, status, NULL, NULL); - } else { - grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, false, - nonsecure_endpoint, cb, user_data); - } -} - -static int ssl_host_matches_name(const tsi_peer *peer, const char *peer_name) { - char *allocated_name = NULL; - int r; - - if (strchr(peer_name, ':') != NULL) { - char *ignored_port; - gpr_split_host_port(peer_name, &allocated_name, &ignored_port); - gpr_free(ignored_port); - peer_name = allocated_name; - if (!peer_name) return 0; - } - r = tsi_ssl_peer_matches_name(peer, peer_name); - gpr_free(allocated_name); - return r; -} - -grpc_auth_context *tsi_ssl_peer_to_auth_context(const tsi_peer *peer) { - size_t i; - grpc_auth_context *ctx = NULL; - const char *peer_identity_property_name = NULL; - - /* The caller has checked the certificate type property. */ - GPR_ASSERT(peer->property_count >= 1); - ctx = grpc_auth_context_create(NULL); - grpc_auth_context_add_cstring_property( - ctx, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, - GRPC_SSL_TRANSPORT_SECURITY_TYPE); - for (i = 0; i < peer->property_count; i++) { - const tsi_peer_property *prop = &peer->properties[i]; - if (prop->name == NULL) continue; - if (strcmp(prop->name, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY) == 0) { - /* If there is no subject alt name, have the CN as the identity. */ - if (peer_identity_property_name == NULL) { - peer_identity_property_name = GRPC_X509_CN_PROPERTY_NAME; - } - grpc_auth_context_add_property(ctx, GRPC_X509_CN_PROPERTY_NAME, - prop->value.data, prop->value.length); - } else if (strcmp(prop->name, - TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY) == 0) { - peer_identity_property_name = GRPC_X509_SAN_PROPERTY_NAME; - grpc_auth_context_add_property(ctx, GRPC_X509_SAN_PROPERTY_NAME, - prop->value.data, prop->value.length); - } else if (strcmp(prop->name, TSI_X509_PEM_CERT_PROPERTY) == 0) { - grpc_auth_context_add_property(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME, - prop->value.data, prop->value.length); - } - } - if (peer_identity_property_name != NULL) { - GPR_ASSERT(grpc_auth_context_set_peer_identity_property_name( - ctx, peer_identity_property_name) == 1); - } - return ctx; -} - -static grpc_security_status ssl_check_peer(grpc_security_connector *sc, - const char *peer_name, - const tsi_peer *peer, - grpc_auth_context **auth_context) { - /* Check the ALPN. */ - const tsi_peer_property *p = - tsi_peer_get_property_by_name(peer, TSI_SSL_ALPN_SELECTED_PROTOCOL); - if (p == NULL) { - gpr_log(GPR_ERROR, "Missing selected ALPN property."); - return GRPC_SECURITY_ERROR; - } - if (!grpc_chttp2_is_alpn_version_supported(p->value.data, p->value.length)) { - gpr_log(GPR_ERROR, "Invalid ALPN value."); - return GRPC_SECURITY_ERROR; - } - - /* Check the peer name if specified. */ - if (peer_name != NULL && !ssl_host_matches_name(peer, peer_name)) { - gpr_log(GPR_ERROR, "Peer name %s is not in peer certificate", peer_name); - return GRPC_SECURITY_ERROR; - } - *auth_context = tsi_ssl_peer_to_auth_context(peer); - return GRPC_SECURITY_OK; -} - -static void ssl_channel_check_peer(grpc_exec_ctx *exec_ctx, - grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { - grpc_ssl_channel_security_connector *c = - (grpc_ssl_channel_security_connector *)sc; - grpc_security_status status; - grpc_auth_context *auth_context = NULL; - status = ssl_check_peer(sc, c->overridden_target_name != NULL - ? c->overridden_target_name - : c->target_name, - &peer, &auth_context); - cb(exec_ctx, user_data, status, auth_context); - grpc_auth_context_unref(auth_context); - tsi_peer_destruct(&peer); -} - -static void ssl_server_check_peer(grpc_exec_ctx *exec_ctx, - grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { - grpc_auth_context *auth_context = NULL; - grpc_security_status status = ssl_check_peer(sc, NULL, &peer, &auth_context); - tsi_peer_destruct(&peer); - cb(exec_ctx, user_data, status, auth_context); - grpc_auth_context_unref(auth_context); -} - -static void add_shallow_auth_property_to_peer(tsi_peer *peer, - const grpc_auth_property *prop, - const char *tsi_prop_name) { - tsi_peer_property *tsi_prop = &peer->properties[peer->property_count++]; - tsi_prop->name = (char *)tsi_prop_name; - tsi_prop->value.data = prop->value; - tsi_prop->value.length = prop->value_length; -} - -tsi_peer tsi_shallow_peer_from_ssl_auth_context( - const grpc_auth_context *auth_context) { - size_t max_num_props = 0; - grpc_auth_property_iterator it; - const grpc_auth_property *prop; - tsi_peer peer; - memset(&peer, 0, sizeof(peer)); - - it = grpc_auth_context_property_iterator(auth_context); - while (grpc_auth_property_iterator_next(&it) != NULL) max_num_props++; - - if (max_num_props > 0) { - peer.properties = gpr_malloc(max_num_props * sizeof(tsi_peer_property)); - it = grpc_auth_context_property_iterator(auth_context); - while ((prop = grpc_auth_property_iterator_next(&it)) != NULL) { - if (strcmp(prop->name, GRPC_X509_SAN_PROPERTY_NAME) == 0) { - add_shallow_auth_property_to_peer( - &peer, prop, TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY); - } else if (strcmp(prop->name, GRPC_X509_CN_PROPERTY_NAME) == 0) { - add_shallow_auth_property_to_peer( - &peer, prop, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY); - } else if (strcmp(prop->name, GRPC_X509_PEM_CERT_PROPERTY_NAME) == 0) { - add_shallow_auth_property_to_peer(&peer, prop, - TSI_X509_PEM_CERT_PROPERTY); - } - } - } - return peer; -} - -void tsi_shallow_peer_destruct(tsi_peer *peer) { - if (peer->properties != NULL) gpr_free(peer->properties); -} - -static void ssl_channel_check_call_host(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - const char *host, - grpc_auth_context *auth_context, - grpc_security_call_host_check_cb cb, - void *user_data) { - grpc_ssl_channel_security_connector *c = - (grpc_ssl_channel_security_connector *)sc; - grpc_security_status status = GRPC_SECURITY_ERROR; - tsi_peer peer = tsi_shallow_peer_from_ssl_auth_context(auth_context); - if (ssl_host_matches_name(&peer, host)) status = GRPC_SECURITY_OK; - - /* If the target name was overridden, then the original target_name was - 'checked' transitively during the previous peer check at the end of the - handshake. */ - if (c->overridden_target_name != NULL && strcmp(host, c->target_name) == 0) { - status = GRPC_SECURITY_OK; - } - cb(exec_ctx, user_data, status); - tsi_shallow_peer_destruct(&peer); -} - -static grpc_security_connector_vtable ssl_channel_vtable = { - ssl_channel_destroy, ssl_channel_check_peer}; - -static grpc_security_connector_vtable ssl_server_vtable = { - ssl_server_destroy, ssl_server_check_peer}; - -static gpr_slice compute_default_pem_root_certs_once(void) { - gpr_slice result = gpr_empty_slice(); - - /* First try to load the roots from the environment. */ - char *default_root_certs_path = - gpr_getenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR); - if (default_root_certs_path != NULL) { - result = gpr_load_file(default_root_certs_path, 0, NULL); - gpr_free(default_root_certs_path); - } - - /* Try overridden roots if needed. */ - grpc_ssl_roots_override_result ovrd_res = GRPC_SSL_ROOTS_OVERRIDE_FAIL; - if (GPR_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != NULL) { - char *pem_root_certs = NULL; - ovrd_res = ssl_roots_override_cb(&pem_root_certs); - if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { - GPR_ASSERT(pem_root_certs != NULL); - result = gpr_slice_new(pem_root_certs, strlen(pem_root_certs), gpr_free); - } - } - - /* Fall back to installed certs if needed. */ - if (GPR_SLICE_IS_EMPTY(result) && - ovrd_res != GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY) { - result = gpr_load_file(installed_roots_path, 0, NULL); - } - return result; -} - -static gpr_slice default_pem_root_certs; - -static void init_default_pem_root_certs(void) { - default_pem_root_certs = compute_default_pem_root_certs_once(); -} - -gpr_slice grpc_get_default_ssl_roots_for_testing(void) { - return compute_default_pem_root_certs_once(); -} - -static tsi_client_certificate_request_type -get_tsi_client_certificate_request_type( - grpc_ssl_client_certificate_request_type grpc_request_type) { - switch (grpc_request_type) { - case GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE: - return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; - - case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: - return TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; - - case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY: - return TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY; - - case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: - return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; - - case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY: - return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY; - - default: - // Is this a sane default - return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; - } -} - -size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) { - /* TODO(jboeuf@google.com): Maybe revisit the approach which consists in - loading all the roots once for the lifetime of the process. */ - static gpr_once once = GPR_ONCE_INIT; - gpr_once_init(&once, init_default_pem_root_certs); - *pem_root_certs = GPR_SLICE_START_PTR(default_pem_root_certs); - return GPR_SLICE_LENGTH(default_pem_root_certs); -} - -grpc_security_status grpc_ssl_channel_security_connector_create( - grpc_call_credentials *request_metadata_creds, - const grpc_ssl_config *config, const char *target_name, - const char *overridden_target_name, grpc_channel_security_connector **sc) { - size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions(); - const unsigned char **alpn_protocol_strings = - gpr_malloc(sizeof(const char *) * num_alpn_protocols); - unsigned char *alpn_protocol_string_lengths = - gpr_malloc(sizeof(unsigned char) * num_alpn_protocols); - tsi_result result = TSI_OK; - grpc_ssl_channel_security_connector *c; - size_t i; - const unsigned char *pem_root_certs; - size_t pem_root_certs_size; - char *port; - - for (i = 0; i < num_alpn_protocols; i++) { - alpn_protocol_strings[i] = - (const unsigned char *)grpc_chttp2_get_alpn_version_index(i); - alpn_protocol_string_lengths[i] = - (unsigned char)strlen(grpc_chttp2_get_alpn_version_index(i)); - } - - if (config == NULL || target_name == NULL) { - gpr_log(GPR_ERROR, "An ssl channel needs a config and a target name."); - goto error; - } - if (config->pem_root_certs == NULL) { - pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs); - if (pem_root_certs == NULL || pem_root_certs_size == 0) { - gpr_log(GPR_ERROR, "Could not get default pem root certs."); - goto error; - } - } else { - pem_root_certs = config->pem_root_certs; - pem_root_certs_size = config->pem_root_certs_size; - } - - c = gpr_malloc(sizeof(grpc_ssl_channel_security_connector)); - memset(c, 0, sizeof(grpc_ssl_channel_security_connector)); - - gpr_ref_init(&c->base.base.refcount, 1); - c->base.base.vtable = &ssl_channel_vtable; - c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; - c->base.request_metadata_creds = - grpc_call_credentials_ref(request_metadata_creds); - c->base.check_call_host = ssl_channel_check_call_host; - c->base.do_handshake = ssl_channel_do_handshake; - gpr_split_host_port(target_name, &c->target_name, &port); - gpr_free(port); - if (overridden_target_name != NULL) { - c->overridden_target_name = gpr_strdup(overridden_target_name); - } - result = tsi_create_ssl_client_handshaker_factory( - config->pem_private_key, config->pem_private_key_size, - config->pem_cert_chain, config->pem_cert_chain_size, pem_root_certs, - pem_root_certs_size, ssl_cipher_suites(), alpn_protocol_strings, - alpn_protocol_string_lengths, (uint16_t)num_alpn_protocols, - &c->handshaker_factory); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", - tsi_result_to_string(result)); - ssl_channel_destroy(&c->base.base); - *sc = NULL; - goto error; - } - *sc = &c->base; - gpr_free((void *)alpn_protocol_strings); - gpr_free(alpn_protocol_string_lengths); - return GRPC_SECURITY_OK; - -error: - gpr_free((void *)alpn_protocol_strings); - gpr_free(alpn_protocol_string_lengths); - return GRPC_SECURITY_ERROR; -} - -grpc_security_status grpc_ssl_server_security_connector_create( - const grpc_ssl_server_config *config, grpc_server_security_connector **sc) { - size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions(); - const unsigned char **alpn_protocol_strings = - gpr_malloc(sizeof(const char *) * num_alpn_protocols); - unsigned char *alpn_protocol_string_lengths = - gpr_malloc(sizeof(unsigned char) * num_alpn_protocols); - tsi_result result = TSI_OK; - grpc_ssl_server_security_connector *c; - size_t i; - - for (i = 0; i < num_alpn_protocols; i++) { - alpn_protocol_strings[i] = - (const unsigned char *)grpc_chttp2_get_alpn_version_index(i); - alpn_protocol_string_lengths[i] = - (unsigned char)strlen(grpc_chttp2_get_alpn_version_index(i)); - } - - if (config == NULL || config->num_key_cert_pairs == 0) { - gpr_log(GPR_ERROR, "An SSL server needs a key and a cert."); - goto error; - } - c = gpr_malloc(sizeof(grpc_ssl_server_security_connector)); - memset(c, 0, sizeof(grpc_ssl_server_security_connector)); - - gpr_ref_init(&c->base.base.refcount, 1); - c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; - c->base.base.vtable = &ssl_server_vtable; - result = tsi_create_ssl_server_handshaker_factory_ex( - (const unsigned char **)config->pem_private_keys, - config->pem_private_keys_sizes, - (const unsigned char **)config->pem_cert_chains, - config->pem_cert_chains_sizes, config->num_key_cert_pairs, - config->pem_root_certs, config->pem_root_certs_size, - get_tsi_client_certificate_request_type( - config->client_certificate_request), - ssl_cipher_suites(), alpn_protocol_strings, alpn_protocol_string_lengths, - (uint16_t)num_alpn_protocols, &c->handshaker_factory); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", - tsi_result_to_string(result)); - ssl_server_destroy(&c->base.base); - *sc = NULL; - goto error; - } - gpr_mu_init(&c->base.mu); - c->base.do_handshake = ssl_server_do_handshake; - *sc = &c->base; - gpr_free((void *)alpn_protocol_strings); - gpr_free(alpn_protocol_string_lengths); - return GRPC_SECURITY_OK; - -error: - gpr_free((void *)alpn_protocol_strings); - gpr_free(alpn_protocol_string_lengths); - return GRPC_SECURITY_ERROR; -} diff --git a/src/core/lib/security/security_connector.h b/src/core/lib/security/security_connector.h deleted file mode 100644 index 2c893cd5e9..0000000000 --- a/src/core/lib/security/security_connector.h +++ /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. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H -#define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H - -#include -#include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/iomgr/tcp_server.h" -#include "src/core/lib/tsi/transport_security_interface.h" - -/* --- status enum. --- */ - -typedef enum { GRPC_SECURITY_OK = 0, GRPC_SECURITY_ERROR } grpc_security_status; - -/* --- URL schemes. --- */ - -#define GRPC_SSL_URL_SCHEME "https" -#define GRPC_FAKE_SECURITY_URL_SCHEME "http+fake_security" - -/* --- security_connector object. --- - - A security connector object represents away to configure the underlying - transport security mechanism and check the resulting trusted peer. */ - -typedef struct grpc_security_connector grpc_security_connector; - -#define GRPC_SECURITY_CONNECTOR_ARG "grpc.security_connector" - -typedef void (*grpc_security_peer_check_cb)(grpc_exec_ctx *exec_ctx, - void *user_data, - grpc_security_status status, - grpc_auth_context *auth_context); - -/* Ownership of the secure_endpoint is transfered. */ -typedef void (*grpc_security_handshake_done_cb)( - grpc_exec_ctx *exec_ctx, void *user_data, grpc_security_status status, - grpc_endpoint *secure_endpoint, grpc_auth_context *auth_context); - -typedef struct { - void (*destroy)(grpc_security_connector *sc); - void (*check_peer)(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, - tsi_peer peer, grpc_security_peer_check_cb cb, - void *user_data); -} grpc_security_connector_vtable; - -typedef struct grpc_security_connector_handshake_list { - void *handshake; - struct grpc_security_connector_handshake_list *next; -} grpc_security_connector_handshake_list; - -struct grpc_security_connector { - const grpc_security_connector_vtable *vtable; - gpr_refcount refcount; - const char *url_scheme; -}; - -/* Refcounting. */ -#ifdef GRPC_SECURITY_CONNECTOR_REFCOUNT_DEBUG -#define GRPC_SECURITY_CONNECTOR_REF(p, r) \ - grpc_security_connector_ref((p), __FILE__, __LINE__, (r)) -#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) \ - grpc_security_connector_unref((p), __FILE__, __LINE__, (r)) -grpc_security_connector *grpc_security_connector_ref( - grpc_security_connector *policy, const char *file, int line, - const char *reason); -void grpc_security_connector_unref(grpc_security_connector *policy, - const char *file, int line, - const char *reason); -#else -#define GRPC_SECURITY_CONNECTOR_REF(p, r) grpc_security_connector_ref((p)) -#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) grpc_security_connector_unref((p)) -grpc_security_connector *grpc_security_connector_ref( - grpc_security_connector *policy); -void grpc_security_connector_unref(grpc_security_connector *policy); -#endif - -/* Check the peer. Callee takes ownership of the peer object. - The callback will include the resulting auth_context. */ -void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx, - grpc_security_connector *sc, - tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data); - -/* Util to encapsulate the connector in a channel arg. */ -grpc_arg grpc_security_connector_to_arg(grpc_security_connector *sc); - -/* Util to get the connector from a channel arg. */ -grpc_security_connector *grpc_security_connector_from_arg(const grpc_arg *arg); - -/* Util to find the connector from channel args. */ -grpc_security_connector *grpc_find_security_connector_in_args( - const grpc_channel_args *args); - -/* --- channel_security_connector object. --- - - A channel security connector object represents away to configure the - underlying transport security mechanism on the client side. */ - -typedef struct grpc_channel_security_connector grpc_channel_security_connector; - -typedef void (*grpc_security_call_host_check_cb)(grpc_exec_ctx *exec_ctx, - void *user_data, - grpc_security_status status); - -struct grpc_channel_security_connector { - grpc_security_connector base; - grpc_call_credentials *request_metadata_creds; - void (*check_call_host)(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, const char *host, - grpc_auth_context *auth_context, - 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_security_handshake_done_cb cb, void *user_data); -}; - -/* Checks that the host that will be set for a call is acceptable. */ -void grpc_channel_security_connector_check_call_host( - grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - const char *host, grpc_auth_context *auth_context, - grpc_security_call_host_check_cb cb, void *user_data); - -/* 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); - -/* --- server_security_connector object. --- - - A server security connector object represents away to configure the - underlying transport security mechanism on the server side. */ - -typedef struct grpc_server_security_connector grpc_server_security_connector; - -struct grpc_server_security_connector { - grpc_security_connector base; - gpr_mu mu; - grpc_security_connector_handshake_list *handshaking_handshakes; - const grpc_channel_args *channel_args; - void (*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); -}; - -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); - -void grpc_server_security_connector_shutdown( - grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector); - -/* --- Creation security connectors. --- */ - -/* For TESTING ONLY! - Creates a fake connector that emulates real channel security. */ -grpc_channel_security_connector *grpc_fake_channel_security_connector_create( - grpc_call_credentials *request_metadata_creds); - -/* For TESTING ONLY! - Creates a fake connector that emulates real server security. */ -grpc_server_security_connector *grpc_fake_server_security_connector_create( - void); - -/* Config for ssl clients. */ -typedef struct { - unsigned char *pem_private_key; - size_t pem_private_key_size; - unsigned char *pem_cert_chain; - size_t pem_cert_chain_size; - unsigned char *pem_root_certs; - size_t pem_root_certs_size; -} grpc_ssl_config; - -/* Creates an SSL channel_security_connector. - - request_metadata_creds is the credentials object which metadata - will be sent with each request. This parameter can be NULL. - - config is the SSL config to be used for the SSL channel establishment. - - is_client should be 0 for a server or a non-0 value for a client. - - secure_peer_name is the secure peer name that should be checked in - grpc_channel_security_connector_check_peer. This parameter may be NULL in - which case the peer name will not be checked. Note that if this parameter - is not NULL, then, pem_root_certs should not be NULL either. - - sc is a pointer on the connector to be created. - This function returns GRPC_SECURITY_OK in case of success or a - specific error code otherwise. -*/ -grpc_security_status grpc_ssl_channel_security_connector_create( - grpc_call_credentials *request_metadata_creds, - const grpc_ssl_config *config, const char *target_name, - const char *overridden_target_name, grpc_channel_security_connector **sc); - -/* Gets the default ssl roots. */ -size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs); - -/* Exposed for TESTING ONLY!. */ -gpr_slice grpc_get_default_ssl_roots_for_testing(void); - -/* Config for ssl servers. */ -typedef struct { - unsigned char **pem_private_keys; - size_t *pem_private_keys_sizes; - unsigned char **pem_cert_chains; - size_t *pem_cert_chains_sizes; - size_t num_key_cert_pairs; - unsigned char *pem_root_certs; - size_t pem_root_certs_size; - grpc_ssl_client_certificate_request_type client_certificate_request; -} grpc_ssl_server_config; - -/* Creates an SSL server_security_connector. - - config is the SSL config to be used for the SSL channel establishment. - - sc is a pointer on the connector to be created. - This function returns GRPC_SECURITY_OK in case of success or a - specific error code otherwise. -*/ -grpc_security_status grpc_ssl_server_security_connector_create( - const grpc_ssl_server_config *config, grpc_server_security_connector **sc); - -/* Util. */ -const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer, - const char *name); - -/* Exposed for testing only. */ -grpc_auth_context *tsi_ssl_peer_to_auth_context(const tsi_peer *peer); -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 */ diff --git a/src/core/lib/security/security_context.c b/src/core/lib/security/security_context.c deleted file mode 100644 index 343e0b5b8b..0000000000 --- a/src/core/lib/security/security_context.c +++ /dev/null @@ -1,347 +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 "src/core/lib/security/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" - -#include -#include -#include -#include - -/* --- grpc_call --- */ - -grpc_call_error grpc_call_set_credentials(grpc_call *call, - grpc_call_credentials *creds) { - grpc_client_security_context *ctx = NULL; - GRPC_API_TRACE("grpc_call_set_credentials(call=%p, creds=%p)", 2, - (call, creds)); - if (!grpc_call_is_client(call)) { - gpr_log(GPR_ERROR, "Method is client-side only."); - return GRPC_CALL_ERROR_NOT_ON_SERVER; - } - ctx = (grpc_client_security_context *)grpc_call_context_get( - call, GRPC_CONTEXT_SECURITY); - if (ctx == NULL) { - ctx = grpc_client_security_context_create(); - ctx->creds = grpc_call_credentials_ref(creds); - grpc_call_context_set(call, GRPC_CONTEXT_SECURITY, ctx, - grpc_client_security_context_destroy); - } else { - grpc_call_credentials_unref(ctx->creds); - ctx->creds = grpc_call_credentials_ref(creds); - } - return GRPC_CALL_OK; -} - -grpc_auth_context *grpc_call_auth_context(grpc_call *call) { - void *sec_ctx = grpc_call_context_get(call, GRPC_CONTEXT_SECURITY); - GRPC_API_TRACE("grpc_call_auth_context(call=%p)", 1, (call)); - if (sec_ctx == NULL) return NULL; - return grpc_call_is_client(call) - ? GRPC_AUTH_CONTEXT_REF( - ((grpc_client_security_context *)sec_ctx)->auth_context, - "grpc_call_auth_context client") - : GRPC_AUTH_CONTEXT_REF( - ((grpc_server_security_context *)sec_ctx)->auth_context, - "grpc_call_auth_context server"); -} - -void grpc_auth_context_release(grpc_auth_context *context) { - GRPC_API_TRACE("grpc_auth_context_release(context=%p)", 1, (context)); - GRPC_AUTH_CONTEXT_UNREF(context, "grpc_auth_context_unref"); -} - -/* --- grpc_client_security_context --- */ - -grpc_client_security_context *grpc_client_security_context_create(void) { - grpc_client_security_context *ctx = - gpr_malloc(sizeof(grpc_client_security_context)); - memset(ctx, 0, sizeof(grpc_client_security_context)); - return ctx; -} - -void grpc_client_security_context_destroy(void *ctx) { - grpc_client_security_context *c = (grpc_client_security_context *)ctx; - grpc_call_credentials_unref(c->creds); - GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "client_security_context"); - gpr_free(ctx); -} - -/* --- grpc_server_security_context --- */ - -grpc_server_security_context *grpc_server_security_context_create(void) { - grpc_server_security_context *ctx = - gpr_malloc(sizeof(grpc_server_security_context)); - memset(ctx, 0, sizeof(grpc_server_security_context)); - return ctx; -} - -void grpc_server_security_context_destroy(void *ctx) { - grpc_server_security_context *c = (grpc_server_security_context *)ctx; - GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "server_security_context"); - gpr_free(ctx); -} - -/* --- grpc_auth_context --- */ - -static grpc_auth_property_iterator empty_iterator = {NULL, 0, NULL}; - -grpc_auth_context *grpc_auth_context_create(grpc_auth_context *chained) { - grpc_auth_context *ctx = gpr_malloc(sizeof(grpc_auth_context)); - memset(ctx, 0, sizeof(grpc_auth_context)); - gpr_ref_init(&ctx->refcount, 1); - if (chained != NULL) { - ctx->chained = GRPC_AUTH_CONTEXT_REF(chained, "chained"); - ctx->peer_identity_property_name = - ctx->chained->peer_identity_property_name; - } - return ctx; -} - -#ifdef GRPC_AUTH_CONTEXT_REFCOUNT_DEBUG -grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *ctx, - const char *file, int line, - const char *reason) { - if (ctx == NULL) return NULL; - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "AUTH_CONTEXT:%p ref %d -> %d %s", ctx, (int)ctx->refcount.count, - (int)ctx->refcount.count + 1, reason); -#else -grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *ctx) { - if (ctx == NULL) return NULL; -#endif - gpr_ref(&ctx->refcount); - return ctx; -} - -#ifdef GRPC_AUTH_CONTEXT_REFCOUNT_DEBUG -void grpc_auth_context_unref(grpc_auth_context *ctx, const char *file, int line, - const char *reason) { - if (ctx == NULL) return; - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "AUTH_CONTEXT:%p unref %d -> %d %s", ctx, (int)ctx->refcount.count, - (int)ctx->refcount.count - 1, reason); -#else -void grpc_auth_context_unref(grpc_auth_context *ctx) { - if (ctx == NULL) return; -#endif - if (gpr_unref(&ctx->refcount)) { - size_t i; - GRPC_AUTH_CONTEXT_UNREF(ctx->chained, "chained"); - if (ctx->properties.array != NULL) { - for (i = 0; i < ctx->properties.count; i++) { - grpc_auth_property_reset(&ctx->properties.array[i]); - } - gpr_free(ctx->properties.array); - } - gpr_free(ctx); - } -} - -const char *grpc_auth_context_peer_identity_property_name( - const grpc_auth_context *ctx) { - GRPC_API_TRACE("grpc_auth_context_peer_identity_property_name(ctx=%p)", 1, - (ctx)); - return ctx->peer_identity_property_name; -} - -int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context *ctx, - const char *name) { - grpc_auth_property_iterator it = - grpc_auth_context_find_properties_by_name(ctx, name); - const grpc_auth_property *prop = grpc_auth_property_iterator_next(&it); - GRPC_API_TRACE( - "grpc_auth_context_set_peer_identity_property_name(ctx=%p, name=%s)", 2, - (ctx, name)); - if (prop == NULL) { - gpr_log(GPR_ERROR, "Property name %s not found in auth context.", - name != NULL ? name : "NULL"); - return 0; - } - ctx->peer_identity_property_name = prop->name; - return 1; -} - -int grpc_auth_context_peer_is_authenticated(const grpc_auth_context *ctx) { - GRPC_API_TRACE("grpc_auth_context_peer_is_authenticated(ctx=%p)", 1, (ctx)); - return ctx->peer_identity_property_name == NULL ? 0 : 1; -} - -grpc_auth_property_iterator grpc_auth_context_property_iterator( - const grpc_auth_context *ctx) { - grpc_auth_property_iterator it = empty_iterator; - GRPC_API_TRACE("grpc_auth_context_property_iterator(ctx=%p)", 1, (ctx)); - if (ctx == NULL) return it; - it.ctx = ctx; - return it; -} - -const grpc_auth_property *grpc_auth_property_iterator_next( - grpc_auth_property_iterator *it) { - GRPC_API_TRACE("grpc_auth_property_iterator_next(it=%p)", 1, (it)); - if (it == NULL || it->ctx == NULL) return NULL; - while (it->index == it->ctx->properties.count) { - if (it->ctx->chained == NULL) return NULL; - it->ctx = it->ctx->chained; - it->index = 0; - } - if (it->name == NULL) { - return &it->ctx->properties.array[it->index++]; - } else { - while (it->index < it->ctx->properties.count) { - const grpc_auth_property *prop = &it->ctx->properties.array[it->index++]; - GPR_ASSERT(prop->name != NULL); - if (strcmp(it->name, prop->name) == 0) { - return prop; - } - } - /* We could not find the name, try another round. */ - return grpc_auth_property_iterator_next(it); - } -} - -grpc_auth_property_iterator grpc_auth_context_find_properties_by_name( - const grpc_auth_context *ctx, const char *name) { - grpc_auth_property_iterator it = empty_iterator; - GRPC_API_TRACE("grpc_auth_context_find_properties_by_name(ctx=%p, name=%s)", - 2, (ctx, name)); - if (ctx == NULL || name == NULL) return empty_iterator; - it.ctx = ctx; - it.name = name; - return it; -} - -grpc_auth_property_iterator grpc_auth_context_peer_identity( - const grpc_auth_context *ctx) { - GRPC_API_TRACE("grpc_auth_context_peer_identity(ctx=%p)", 1, (ctx)); - if (ctx == NULL) return empty_iterator; - return grpc_auth_context_find_properties_by_name( - ctx, ctx->peer_identity_property_name); -} - -static void ensure_auth_context_capacity(grpc_auth_context *ctx) { - if (ctx->properties.count == ctx->properties.capacity) { - ctx->properties.capacity = - GPR_MAX(ctx->properties.capacity + 8, ctx->properties.capacity * 2); - ctx->properties.array = - gpr_realloc(ctx->properties.array, - ctx->properties.capacity * sizeof(grpc_auth_property)); - } -} - -void grpc_auth_context_add_property(grpc_auth_context *ctx, const char *name, - const char *value, size_t value_length) { - grpc_auth_property *prop; - GRPC_API_TRACE( - "grpc_auth_context_add_property(ctx=%p, name=%s, value=%*.*s, " - "value_length=%lu)", - 6, (ctx, name, (int)value_length, (int)value_length, value, - (unsigned long)value_length)); - ensure_auth_context_capacity(ctx); - prop = &ctx->properties.array[ctx->properties.count++]; - prop->name = gpr_strdup(name); - prop->value = gpr_malloc(value_length + 1); - memcpy(prop->value, value, value_length); - prop->value[value_length] = '\0'; - prop->value_length = value_length; -} - -void grpc_auth_context_add_cstring_property(grpc_auth_context *ctx, - const char *name, - const char *value) { - grpc_auth_property *prop; - GRPC_API_TRACE( - "grpc_auth_context_add_cstring_property(ctx=%p, name=%s, value=%s)", 3, - (ctx, name, value)); - ensure_auth_context_capacity(ctx); - prop = &ctx->properties.array[ctx->properties.count++]; - prop->name = gpr_strdup(name); - prop->value = gpr_strdup(value); - prop->value_length = strlen(value); -} - -void grpc_auth_property_reset(grpc_auth_property *property) { - gpr_free(property->name); - gpr_free(property->value); - memset(property, 0, sizeof(grpc_auth_property)); -} - -static void auth_context_pointer_arg_destroy(void *p) { - GRPC_AUTH_CONTEXT_UNREF(p, "auth_context_pointer_arg"); -} - -static void *auth_context_pointer_arg_copy(void *p) { - return GRPC_AUTH_CONTEXT_REF(p, "auth_context_pointer_arg"); -} - -static int auth_context_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); } - -static const grpc_arg_pointer_vtable auth_context_pointer_vtable = { - auth_context_pointer_arg_copy, auth_context_pointer_arg_destroy, - auth_context_pointer_cmp}; - -grpc_arg grpc_auth_context_to_arg(grpc_auth_context *p) { - grpc_arg arg; - memset(&arg, 0, sizeof(grpc_arg)); - arg.type = GRPC_ARG_POINTER; - arg.key = GRPC_AUTH_CONTEXT_ARG; - arg.value.pointer.p = p; - arg.value.pointer.vtable = &auth_context_pointer_vtable; - return arg; -} - -grpc_auth_context *grpc_auth_context_from_arg(const grpc_arg *arg) { - if (strcmp(arg->key, GRPC_AUTH_CONTEXT_ARG) != 0) return NULL; - if (arg->type != GRPC_ARG_POINTER) { - gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, - GRPC_AUTH_CONTEXT_ARG); - return NULL; - } - return arg->value.pointer.p; -} - -grpc_auth_context *grpc_find_auth_context_in_args( - const grpc_channel_args *args) { - size_t i; - if (args == NULL) return NULL; - for (i = 0; i < args->num_args; i++) { - grpc_auth_context *p = grpc_auth_context_from_arg(&args->args[i]); - if (p != NULL) return p; - } - return NULL; -} diff --git a/src/core/lib/security/security_context.h b/src/core/lib/security/security_context.h deleted file mode 100644 index 81161ec47d..0000000000 --- a/src/core/lib/security/security_context.h +++ /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. - * - */ - -#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H -#define GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H - -#include "src/core/lib/iomgr/pollset.h" -#include "src/core/lib/security/credentials.h" - -/* --- grpc_auth_context --- - - High level authentication context object. Can optionally be chained. */ - -/* Property names are always NULL terminated. */ - -typedef struct { - grpc_auth_property *array; - size_t count; - size_t capacity; -} grpc_auth_property_array; - -struct grpc_auth_context { - struct grpc_auth_context *chained; - grpc_auth_property_array properties; - gpr_refcount refcount; - const char *peer_identity_property_name; - grpc_pollset *pollset; -}; - -/* Creation. */ -grpc_auth_context *grpc_auth_context_create(grpc_auth_context *chained); - -/* Refcounting. */ -#ifdef GRPC_AUTH_CONTEXT_REFCOUNT_DEBUG -#define GRPC_AUTH_CONTEXT_REF(p, r) \ - grpc_auth_context_ref((p), __FILE__, __LINE__, (r)) -#define GRPC_AUTH_CONTEXT_UNREF(p, r) \ - grpc_auth_context_unref((p), __FILE__, __LINE__, (r)) -grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *policy, - const char *file, int line, - const char *reason); -void grpc_auth_context_unref(grpc_auth_context *policy, const char *file, - int line, const char *reason); -#else -#define GRPC_AUTH_CONTEXT_REF(p, r) grpc_auth_context_ref((p)) -#define GRPC_AUTH_CONTEXT_UNREF(p, r) grpc_auth_context_unref((p)) -grpc_auth_context *grpc_auth_context_ref(grpc_auth_context *policy); -void grpc_auth_context_unref(grpc_auth_context *policy); -#endif - -void grpc_auth_property_reset(grpc_auth_property *property); - -/* --- grpc_client_security_context --- - - Internal client-side security context. */ - -typedef struct { - grpc_call_credentials *creds; - grpc_auth_context *auth_context; -} grpc_client_security_context; - -grpc_client_security_context *grpc_client_security_context_create(void); -void grpc_client_security_context_destroy(void *ctx); - -/* --- grpc_server_security_context --- - - Internal server-side security context. */ - -typedef struct { - grpc_auth_context *auth_context; -} grpc_server_security_context; - -grpc_server_security_context *grpc_server_security_context_create(void); -void grpc_server_security_context_destroy(void *ctx); - -/* --- Channel args for auth context --- */ -#define GRPC_AUTH_CONTEXT_ARG "grpc.auth_context" - -grpc_arg grpc_auth_context_to_arg(grpc_auth_context *c); -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 */ diff --git a/src/core/lib/security/server_auth_filter.c b/src/core/lib/security/server_auth_filter.c deleted file mode 100644 index 3320497d21..0000000000 --- a/src/core/lib/security/server_auth_filter.c +++ /dev/null @@ -1,264 +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 "src/core/lib/security/auth_filters.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/security_context.h" - -#include -#include - -typedef struct call_data { - grpc_metadata_batch *recv_initial_metadata; - /* Closure to call when finished with the auth_on_recv hook. */ - grpc_closure *on_done_recv; - /* Receive closures are chained: we inject this closure as the on_done_recv - up-call on transport_op, and remember to call our on_done_recv member after - handling it. */ - grpc_closure auth_on_recv; - grpc_transport_stream_op transport_op; - grpc_metadata_array md; - const grpc_metadata *consumed_md; - size_t num_consumed_md; - grpc_auth_context *auth_context; -} call_data; - -typedef struct channel_data { - grpc_auth_context *auth_context; - grpc_server_credentials *creds; -} channel_data; - -static grpc_metadata_array metadata_batch_to_md_array( - const grpc_metadata_batch *batch) { - grpc_linked_mdelem *l; - grpc_metadata_array result; - grpc_metadata_array_init(&result); - for (l = batch->list.head; l != NULL; l = l->next) { - grpc_metadata *usr_md = NULL; - grpc_mdelem *md = l->md; - grpc_mdstr *key = md->key; - grpc_mdstr *value = md->value; - if (result.count == result.capacity) { - result.capacity = GPR_MAX(result.capacity + 8, result.capacity * 2); - result.metadata = - gpr_realloc(result.metadata, result.capacity * sizeof(grpc_metadata)); - } - usr_md = &result.metadata[result.count++]; - usr_md->key = grpc_mdstr_as_c_string(key); - usr_md->value = grpc_mdstr_as_c_string(value); - usr_md->value_length = GPR_SLICE_LENGTH(value->slice); - } - return result; -} - -static grpc_mdelem *remove_consumed_md(void *user_data, grpc_mdelem *md) { - grpc_call_element *elem = user_data; - call_data *calld = elem->call_data; - size_t i; - for (i = 0; i < calld->num_consumed_md; i++) { - const grpc_metadata *consumed_md = &calld->consumed_md[i]; - /* Maybe we could do a pointer comparison but we do not have any guarantee - that the metadata processor used the same pointers for consumed_md in the - callback. */ - if (GPR_SLICE_LENGTH(md->key->slice) != strlen(consumed_md->key) || - GPR_SLICE_LENGTH(md->value->slice) != consumed_md->value_length) { - continue; - } - if (memcmp(GPR_SLICE_START_PTR(md->key->slice), consumed_md->key, - GPR_SLICE_LENGTH(md->key->slice)) == 0 && - memcmp(GPR_SLICE_START_PTR(md->value->slice), consumed_md->value, - GPR_SLICE_LENGTH(md->value->slice)) == 0) { - return NULL; /* Delete. */ - } - } - return md; -} - -/* called from application code */ -static void on_md_processing_done( - void *user_data, const grpc_metadata *consumed_md, size_t num_consumed_md, - const grpc_metadata *response_md, size_t num_response_md, - grpc_status_code status, const char *error_details) { - grpc_call_element *elem = user_data; - call_data *calld = elem->call_data; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - /* TODO(jboeuf): Implement support for response_md. */ - if (response_md != NULL && num_response_md > 0) { - gpr_log(GPR_INFO, - "response_md in auth metadata processing not supported for now. " - "Ignoring..."); - } - - if (status == GRPC_STATUS_OK) { - calld->consumed_md = consumed_md; - calld->num_consumed_md = num_consumed_md; - 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); - } else { - gpr_slice message; - grpc_transport_stream_op close_op; - memset(&close_op, 0, sizeof(close_op)); - grpc_metadata_array_destroy(&calld->md); - error_details = error_details != NULL - ? error_details - : "Authentication metadata processing failed."; - message = gpr_slice_from_copied_string(error_details); - calld->transport_op.send_initial_metadata = NULL; - if (calld->transport_op.send_message != NULL) { - grpc_byte_stream_destroy(&exec_ctx, calld->transport_op.send_message); - calld->transport_op.send_message = NULL; - } - 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_finish(&exec_ctx); -} - -static void auth_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, - bool success) { - grpc_call_element *elem = user_data; - call_data *calld = elem->call_data; - channel_data *chand = elem->channel_data; - if (success) { - if (chand->creds->processor.process != NULL) { - calld->md = metadata_batch_to_md_array(calld->recv_initial_metadata); - chand->creds->processor.process( - chand->creds->processor.state, calld->auth_context, - calld->md.metadata, calld->md.count, on_md_processing_done, elem); - return; - } - } - calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, success); -} - -static void set_recv_ops_md_callbacks(grpc_call_element *elem, - grpc_transport_stream_op *op) { - call_data *calld = elem->call_data; - - if (op->recv_initial_metadata != NULL) { - /* substitute our callback for the higher callback */ - calld->recv_initial_metadata = op->recv_initial_metadata; - calld->on_done_recv = op->recv_initial_metadata_ready; - op->recv_initial_metadata_ready = &calld->auth_on_recv; - calld->transport_op = *op; - } -} - -/* Called either: - - in response to an API call (or similar) from above, to send something - - a network event (or similar) from below, to receive something - op contains type and call direction information, in addition to the data - that is being sent or received. */ -static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_transport_stream_op *op) { - set_recv_ops_md_callbacks(elem, op); - grpc_call_next_op(exec_ctx, elem, op); -} - -/* 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; - channel_data *chand = elem->channel_data; - grpc_server_security_context *server_ctx = NULL; - - /* initialize members */ - memset(calld, 0, sizeof(*calld)); - grpc_closure_init(&calld->auth_on_recv, auth_on_recv, elem); - - if (args->context[GRPC_CONTEXT_SECURITY].value != NULL) { - args->context[GRPC_CONTEXT_SECURITY].destroy( - args->context[GRPC_CONTEXT_SECURITY].value); - } - - server_ctx = grpc_server_security_context_create(); - server_ctx->auth_context = grpc_auth_context_create(chand->auth_context); - calld->auth_context = server_ctx->auth_context; - - args->context[GRPC_CONTEXT_SECURITY].value = server_ctx; - args->context[GRPC_CONTEXT_SECURITY].destroy = - 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, - void *ignored) {} - -/* Constructor for channel_data */ -static void init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { - grpc_auth_context *auth_context = - grpc_find_auth_context_in_args(args->channel_args); - grpc_server_credentials *creds = - grpc_find_server_credentials_in_args(args->channel_args); - /* grab pointers to our data from the channel element */ - channel_data *chand = elem->channel_data; - - GPR_ASSERT(!args->is_last); - GPR_ASSERT(auth_context != NULL); - GPR_ASSERT(creds != NULL); - - /* initialize members */ - chand->auth_context = - GRPC_AUTH_CONTEXT_REF(auth_context, "server_auth_filter"); - chand->creds = grpc_server_credentials_ref(creds); -} - -/* Destructor for channel data */ -static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem) { - /* grab pointers to our data from the channel element */ - channel_data *chand = elem->channel_data; - GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "server_auth_filter"); - grpc_server_credentials_unref(chand->creds); -} - -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"}; diff --git a/src/core/lib/security/transport/auth_filters.h b/src/core/lib/security/transport/auth_filters.h new file mode 100644 index 0000000000..f688d4ed21 --- /dev/null +++ b/src/core/lib/security/transport/auth_filters.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 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_TRANSPORT_AUTH_FILTERS_H */ diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c new file mode 100644 index 0000000000..e3cbcb4433 --- /dev/null +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -0,0 +1,336 @@ +/* + * + * 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/auth_filters.h" + +#include + +#include +#include +#include + +#include "src/core/lib/channel/channel_stack.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" + +#define MAX_CREDENTIALS_METADATA_COUNT 4 + +/* We can have a per-call credentials. */ +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; + grpc_transport_stream_op op; + uint8_t security_context_set; + grpc_linked_mdelem md_links[MAX_CREDENTIALS_METADATA_COUNT]; + grpc_auth_metadata_context auth_md_context; +} call_data; + +/* We can have a per-channel credentials. */ +typedef struct { + grpc_channel_security_connector *security_connector; + grpc_auth_context *auth_context; +} channel_data; + +static void reset_auth_metadata_context( + grpc_auth_metadata_context *auth_md_context) { + if (auth_md_context->service_url != NULL) { + gpr_free((char *)auth_md_context->service_url); + auth_md_context->service_url = NULL; + } + if (auth_md_context->method_name != NULL) { + gpr_free((char *)auth_md_context->method_name); + auth_md_context->method_name = NULL; + } + GRPC_AUTH_CONTEXT_UNREF( + (grpc_auth_context *)auth_md_context->channel_auth_context, + "grpc_auth_metadata_context"); + auth_md_context->channel_auth_context = NULL; +} + +static void bubble_up_error(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + grpc_status_code status, const char *error_msg) { + call_data *calld = elem->call_data; + gpr_log(GPR_ERROR, "Client side authentication failure: %s", error_msg); + grpc_transport_stream_op_add_cancellation(&calld->op, status); + grpc_call_next_op(exec_ctx, elem, &calld->op); +} + +static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_credentials_md *md_elems, + size_t num_md, + grpc_credentials_status status) { + grpc_call_element *elem = (grpc_call_element *)user_data; + call_data *calld = elem->call_data; + grpc_transport_stream_op *op = &calld->op; + grpc_metadata_batch *mdb; + size_t i; + reset_auth_metadata_context(&calld->auth_md_context); + if (status != GRPC_CREDENTIALS_OK) { + bubble_up_error(exec_ctx, elem, GRPC_STATUS_UNAUTHENTICATED, + "Credentials failed to get metadata."); + return; + } + GPR_ASSERT(num_md <= MAX_CREDENTIALS_METADATA_COUNT); + GPR_ASSERT(op->send_initial_metadata != NULL); + mdb = op->send_initial_metadata; + for (i = 0; i < num_md; i++) { + grpc_metadata_batch_add_tail( + mdb, &calld->md_links[i], + grpc_mdelem_from_slices(gpr_slice_ref(md_elems[i].key), + gpr_slice_ref(md_elems[i].value))); + } + grpc_call_next_op(exec_ctx, elem, op); +} + +void build_auth_metadata_context(grpc_security_connector *sc, + grpc_auth_context *auth_context, + call_data *calld) { + char *service = gpr_strdup(grpc_mdstr_as_c_string(calld->method)); + char *last_slash = strrchr(service, '/'); + char *method_name = NULL; + char *service_url = NULL; + reset_auth_metadata_context(&calld->auth_md_context); + if (last_slash == NULL) { + gpr_log(GPR_ERROR, "No '/' found in fully qualified method name"); + service[0] = '\0'; + } else if (last_slash == service) { + /* No service part in fully qualified method name: will just be "/". */ + service[1] = '\0'; + } else { + *last_slash = '\0'; + method_name = gpr_strdup(last_slash + 1); + } + if (method_name == NULL) method_name = gpr_strdup(""); + gpr_asprintf(&service_url, "%s://%s%s", + sc->url_scheme == NULL ? "" : sc->url_scheme, + grpc_mdstr_as_c_string(calld->host), service); + calld->auth_md_context.service_url = service_url; + calld->auth_md_context.method_name = method_name; + calld->auth_md_context.channel_auth_context = + GRPC_AUTH_CONTEXT_REF(auth_context, "grpc_auth_metadata_context"); + gpr_free(service); +} + +static void send_security_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_transport_stream_op *op) { + call_data *calld = elem->call_data; + channel_data *chand = elem->channel_data; + grpc_client_security_context *ctx = + (grpc_client_security_context *)op->context[GRPC_CONTEXT_SECURITY].value; + grpc_call_credentials *channel_call_creds = + chand->security_connector->request_metadata_creds; + int call_creds_has_md = (ctx != NULL) && (ctx->creds != NULL); + + if (channel_call_creds == NULL && !call_creds_has_md) { + /* Skip sending metadata altogether. */ + grpc_call_next_op(exec_ctx, elem, op); + return; + } + + if (channel_call_creds != NULL && call_creds_has_md) { + 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, + "Incompatible credentials set on channel and call."); + return; + } + } else { + calld->creds = grpc_call_credentials_ref( + call_creds_has_md ? ctx->creds : channel_call_creds); + } + + 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); + grpc_call_credentials_get_request_metadata( + exec_ctx, calld->creds, calld->pollset, calld->auth_md_context, + on_credentials_metadata, elem); +} + +static void on_host_checked(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_security_status status) { + grpc_call_element *elem = (grpc_call_element *)user_data; + call_data *calld = elem->call_data; + + if (status == GRPC_SECURITY_OK) { + send_security_metadata(exec_ctx, elem, &calld->op); + } else { + 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); + gpr_free(error_msg); + } +} + +/* Called either: + - in response to an API call (or similar) from above, to send something + - a network event (or similar) from below, to receive something + op contains type and call direction information, in addition to the data + that is being sent or received. */ +static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_transport_stream_op *op) { + /* grab pointers to our data from the call element */ + call_data *calld = elem->call_data; + channel_data *chand = elem->channel_data; + grpc_linked_mdelem *l; + grpc_client_security_context *sec_ctx = NULL; + + if (calld->security_context_set == 0 && + op->cancel_with_status == GRPC_STATUS_OK) { + calld->security_context_set = 1; + GPR_ASSERT(op->context); + if (op->context[GRPC_CONTEXT_SECURITY].value == NULL) { + op->context[GRPC_CONTEXT_SECURITY].value = + grpc_client_security_context_create(); + op->context[GRPC_CONTEXT_SECURITY].destroy = + grpc_client_security_context_destroy; + } + sec_ctx = op->context[GRPC_CONTEXT_SECURITY].value; + GRPC_AUTH_CONTEXT_UNREF(sec_ctx->auth_context, "client auth filter"); + sec_ctx->auth_context = + GRPC_AUTH_CONTEXT_REF(chand->auth_context, "client_auth_filter"); + } + + if (op->send_initial_metadata != NULL) { + for (l = op->send_initial_metadata->list.head; l != NULL; l = l->next) { + grpc_mdelem *md = l->md; + /* Pointer comparison is OK for md_elems created from the same context. + */ + if (md->key == GRPC_MDSTR_AUTHORITY) { + if (calld->host != NULL) GRPC_MDSTR_UNREF(calld->host); + calld->host = GRPC_MDSTR_REF(md->value); + } else if (md->key == GRPC_MDSTR_PATH) { + if (calld->method != NULL) GRPC_MDSTR_UNREF(calld->method); + calld->method = GRPC_MDSTR_REF(md->value); + } + } + if (calld->host != NULL) { + const char *call_host = grpc_mdstr_as_c_string(calld->host); + calld->op = *op; /* Copy op (originates from the caller's stack). */ + grpc_channel_security_connector_check_call_host( + exec_ctx, chand->security_connector, call_host, chand->auth_context, + on_host_checked, elem); + return; /* early exit */ + } + } + + /* pass control down the stack */ + grpc_call_next_op(exec_ctx, elem, op); +} + +/* Constructor for call_data */ +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)); +} + +static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + grpc_pollset *pollset) { + call_data *calld = elem->call_data; + calld->pollset = pollset; +} + +/* Destructor for call_data */ +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) { + GRPC_MDSTR_UNREF(calld->host); + } + if (calld->method != NULL) { + GRPC_MDSTR_UNREF(calld->method); + } + reset_auth_metadata_context(&calld->auth_md_context); +} + +/* Constructor for channel_data */ +static void init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { + grpc_security_connector *sc = + grpc_find_security_connector_in_args(args->channel_args); + grpc_auth_context *auth_context = + grpc_find_auth_context_in_args(args->channel_args); + + /* grab pointers to our data from the channel element */ + channel_data *chand = elem->channel_data; + + /* The first and the last filters tend to be implemented differently to + handle the case that there's no 'next' filter to call on the up or down + path */ + GPR_ASSERT(!args->is_last); + GPR_ASSERT(sc != NULL); + GPR_ASSERT(auth_context != NULL); + + /* initialize members */ + chand->security_connector = + (grpc_channel_security_connector *)GRPC_SECURITY_CONNECTOR_REF( + sc, "client_auth_filter"); + chand->auth_context = + GRPC_AUTH_CONTEXT_REF(auth_context, "client_auth_filter"); +} + +/* Destructor for channel data */ +static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem) { + /* grab pointers to our data from the channel element */ + channel_data *chand = elem->channel_data; + grpc_channel_security_connector *sc = chand->security_connector; + if (sc != NULL) { + GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "client_auth_filter"); + } + 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"}; diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c new file mode 100644 index 0000000000..6561f4b47d --- /dev/null +++ b/src/core/lib/security/transport/handshake.c @@ -0,0 +1,336 @@ +/* + * + * 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/handshake.h" + +#include +#include + +#include +#include +#include +#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 + +typedef struct { + grpc_security_connector *connector; + tsi_handshaker *handshaker; + bool is_client_side; + unsigned char *handshake_buffer; + size_t handshake_buffer_size; + grpc_endpoint *wrapped_endpoint; + grpc_endpoint *secure_endpoint; + gpr_slice_buffer left_overs; + gpr_slice_buffer incoming; + gpr_slice_buffer outgoing; + grpc_security_handshake_done_cb cb; + void *user_data; + grpc_closure on_handshake_data_sent_to_peer; + grpc_closure on_handshake_data_received_from_peer; + grpc_auth_context *auth_context; +} grpc_security_handshake; + +static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, + void *setup, bool success); + +static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, + bool success); + +static void security_connector_remove_handshake(grpc_security_handshake *h) { + GPR_ASSERT(!h->is_client_side); + grpc_security_connector_handshake_list *node; + grpc_security_connector_handshake_list *tmp; + grpc_server_security_connector *sc = + (grpc_server_security_connector *)h->connector; + gpr_mu_lock(&sc->mu); + node = sc->handshaking_handshakes; + if (node && node->handshake == h) { + sc->handshaking_handshakes = node->next; + gpr_free(node); + gpr_mu_unlock(&sc->mu); + return; + } + while (node) { + if (node->next->handshake == h) { + tmp = node->next; + node->next = node->next->next; + gpr_free(tmp); + gpr_mu_unlock(&sc->mu); + return; + } + node = node->next; + } + gpr_mu_unlock(&sc->mu); +} + +static void security_handshake_done(grpc_exec_ctx *exec_ctx, + grpc_security_handshake *h, + int is_success) { + if (!h->is_client_side) { + security_connector_remove_handshake(h); + } + if (is_success) { + h->cb(exec_ctx, h->user_data, GRPC_SECURITY_OK, h->secure_endpoint, + h->auth_context); + } else { + if (h->secure_endpoint != NULL) { + grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); + grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); + } else { + grpc_endpoint_destroy(exec_ctx, h->wrapped_endpoint); + } + 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); +} + +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; + 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); + 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); + return; + } + h->secure_endpoint = + grpc_secure_endpoint_create(protector, h->wrapped_endpoint, + 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); + return; +} + +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); + + 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); + return; + } + grpc_security_connector_check_peer(exec_ctx, h->connector, peer, + on_peer_checked, h); +} + +static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, + grpc_security_handshake *h) { + size_t offset = 0; + tsi_result result = TSI_OK; + gpr_slice to_send; + + do { + size_t to_send_size = h->handshake_buffer_size - offset; + result = tsi_handshaker_get_bytes_to_send_to_peer( + h->handshaker, h->handshake_buffer + offset, &to_send_size); + offset += to_send_size; + if (result == TSI_INCOMPLETE_DATA) { + h->handshake_buffer_size *= 2; + h->handshake_buffer = + gpr_realloc(h->handshake_buffer, h->handshake_buffer_size); + } + } 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); + return; + } + + to_send = + gpr_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); + gpr_slice_buffer_reset_and_unref(&h->outgoing); + gpr_slice_buffer_add(&h->outgoing, to_send); + /* TODO(klempner,jboeuf): This should probably use the client setup + deadline */ + grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, + &h->on_handshake_data_sent_to_peer); +} + +static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, + void *handshake, + bool success) { + grpc_security_handshake *h = handshake; + size_t consumed_slice_size = 0; + tsi_result result = TSI_OK; + size_t i; + 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); + return; + } + + for (i = 0; i < h->incoming.count; i++) { + consumed_slice_size = GPR_SLICE_LENGTH(h->incoming.slices[i]); + result = tsi_handshaker_process_bytes_from_peer( + h->handshaker, GPR_SLICE_START_PTR(h->incoming.slices[i]), + &consumed_slice_size); + if (!tsi_handshaker_is_in_progress(h->handshaker)) break; + } + + if (tsi_handshaker_is_in_progress(h->handshaker)) { + /* We may need more data. */ + if (result == TSI_INCOMPLETE_DATA) { + grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, &h->incoming, + &h->on_handshake_data_received_from_peer); + return; + } else { + send_handshake_bytes_to_peer(exec_ctx, h); + return; + } + } + + 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); + return; + } + + /* Handshake is done and successful this point. */ + has_left_overs_in_current_slice = + (consumed_slice_size < GPR_SLICE_LENGTH(h->incoming.slices[i])); + num_left_overs = + (has_left_overs_in_current_slice ? 1 : 0) + h->incoming.count - i - 1; + if (num_left_overs == 0) { + check_peer(exec_ctx, h); + return; + } + + /* Put the leftovers in our buffer (ownership transfered). */ + if (has_left_overs_in_current_slice) { + gpr_slice_buffer_add( + &h->left_overs, + gpr_slice_split_tail(&h->incoming.slices[i], consumed_slice_size)); + gpr_slice_unref( + h->incoming.slices[i]); /* split_tail above increments refcount. */ + } + gpr_slice_buffer_addn( + &h->left_overs, &h->incoming.slices[i + 1], + num_left_overs - (size_t)has_left_overs_in_current_slice); + check_peer(exec_ctx, h); +} + +/* 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) { + 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); + return; + } + + /* We may be done. */ + if (tsi_handshaker_is_in_progress(h->handshaker)) { + /* TODO(klempner,jboeuf): This should probably use the client setup + deadline */ + grpc_endpoint_read(exec_ctx, h->wrapped_endpoint, &h->incoming, + &h->on_handshake_data_received_from_peer); + } else { + check_peer(exec_ctx, h); + } +} + +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) { + grpc_security_connector_handshake_list *handshake_node; + grpc_security_handshake *h = gpr_malloc(sizeof(grpc_security_handshake)); + memset(h, 0, sizeof(grpc_security_handshake)); + h->handshaker = handshaker; + h->connector = GRPC_SECURITY_CONNECTOR_REF(connector, "handshake"); + h->is_client_side = is_client_side; + h->handshake_buffer_size = GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE; + h->handshake_buffer = gpr_malloc(h->handshake_buffer_size); + h->wrapped_endpoint = nonsecure_endpoint; + h->user_data = user_data; + h->cb = cb; + 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, + on_handshake_data_received_from_peer, h); + gpr_slice_buffer_init(&h->left_overs); + gpr_slice_buffer_init(&h->outgoing); + gpr_slice_buffer_init(&h->incoming); + if (!is_client_side) { + grpc_server_security_connector *server_connector = + (grpc_server_security_connector *)connector; + handshake_node = gpr_malloc(sizeof(grpc_security_connector_handshake_list)); + handshake_node->handshake = h; + gpr_mu_lock(&server_connector->mu); + handshake_node->next = server_connector->handshaking_handshakes; + server_connector->handshaking_handshakes = handshake_node; + gpr_mu_unlock(&server_connector->mu); + } + send_handshake_bytes_to_peer(exec_ctx, h); +} + +void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, + void *handshake) { + grpc_security_handshake *h = handshake; + grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); +} diff --git a/src/core/lib/security/transport/handshake.h b/src/core/lib/security/transport/handshake.h new file mode 100644 index 0000000000..6ed850b315 --- /dev/null +++ b/src/core/lib/security/transport/handshake.h @@ -0,0 +1,51 @@ +/* + * + * 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_TRANSPORT_HANDSHAKE_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H + +#include "src/core/lib/iomgr/endpoint.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, + 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_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); + +#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H */ diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c new file mode 100644 index 0000000000..4438c8e559 --- /dev/null +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -0,0 +1,384 @@ +/* + * + * 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/secure_endpoint.h" +#include +#include +#include +#include +#include +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/tsi/transport_security_interface.h" + +#define STAGING_BUFFER_SIZE 8192 + +typedef struct { + grpc_endpoint base; + grpc_endpoint *wrapped_ep; + struct tsi_frame_protector *protector; + gpr_mu protector_mu; + /* saved upper level callbacks and user_data. */ + grpc_closure *read_cb; + grpc_closure *write_cb; + grpc_closure on_read; + gpr_slice_buffer *read_buffer; + gpr_slice_buffer source_buffer; + /* saved handshaker leftover data to unprotect. */ + gpr_slice_buffer leftover_bytes; + /* buffers for read and write */ + gpr_slice read_staging_buffer; + + gpr_slice write_staging_buffer; + gpr_slice_buffer output_buffer; + + gpr_refcount ref; +} secure_endpoint; + +int grpc_trace_secure_endpoint = 0; + +static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) { + secure_endpoint *ep = secure_ep; + grpc_endpoint_destroy(exec_ctx, ep->wrapped_ep); + tsi_frame_protector_destroy(ep->protector); + gpr_slice_buffer_destroy(&ep->leftover_bytes); + gpr_slice_unref(ep->read_staging_buffer); + gpr_slice_unref(ep->write_staging_buffer); + gpr_slice_buffer_destroy(&ep->output_buffer); + gpr_slice_buffer_destroy(&ep->source_buffer); + gpr_mu_destroy(&ep->protector_mu); + gpr_free(ep); +} + +/*#define GRPC_SECURE_ENDPOINT_REFCOUNT_DEBUG*/ +#ifdef GRPC_SECURE_ENDPOINT_REFCOUNT_DEBUG +#define SECURE_ENDPOINT_UNREF(exec_ctx, ep, reason) \ + secure_endpoint_unref((exec_ctx), (ep), (reason), __FILE__, __LINE__) +#define SECURE_ENDPOINT_REF(ep, reason) \ + secure_endpoint_ref((ep), (reason), __FILE__, __LINE__) +static void secure_endpoint_unref(secure_endpoint *ep, + grpc_closure_list *closure_list, + const char *reason, const char *file, + int line) { + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "SECENDP unref %p : %s %d -> %d", + ep, reason, ep->ref.count, ep->ref.count - 1); + if (gpr_unref(&ep->ref)) { + destroy(exec_ctx, ep); + } +} + +static void secure_endpoint_ref(secure_endpoint *ep, const char *reason, + const char *file, int line) { + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "SECENDP ref %p : %s %d -> %d", + ep, reason, ep->ref.count, ep->ref.count + 1); + gpr_ref(&ep->ref); +} +#else +#define SECURE_ENDPOINT_UNREF(exec_ctx, ep, reason) \ + secure_endpoint_unref((exec_ctx), (ep)) +#define SECURE_ENDPOINT_REF(ep, reason) secure_endpoint_ref((ep)) +static void secure_endpoint_unref(grpc_exec_ctx *exec_ctx, + secure_endpoint *ep) { + if (gpr_unref(&ep->ref)) { + destroy(exec_ctx, ep); + } +} + +static void secure_endpoint_ref(secure_endpoint *ep) { gpr_ref(&ep->ref); } +#endif + +static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, + uint8_t **end) { + gpr_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); + ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); + *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); +} + +static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, + bool success) { + if (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], + GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "READ %p: %s", ep, data); + gpr_free(data); + } + } + ep->read_buffer = NULL; + grpc_exec_ctx_enqueue(exec_ctx, ep->read_cb, success, NULL); + SECURE_ENDPOINT_UNREF(exec_ctx, ep, "read"); +} + +static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { + unsigned i; + uint8_t keep_looping = 0; + tsi_result result = TSI_OK; + secure_endpoint *ep = (secure_endpoint *)user_data; + uint8_t *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); + uint8_t *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); + + if (!success) { + gpr_slice_buffer_reset_and_unref(ep->read_buffer); + call_read_cb(exec_ctx, ep, 0); + return; + } + + /* TODO(yangg) check error, maybe bail out early */ + for (i = 0; i < ep->source_buffer.count; i++) { + gpr_slice encrypted = ep->source_buffer.slices[i]; + uint8_t *message_bytes = GPR_SLICE_START_PTR(encrypted); + size_t message_size = GPR_SLICE_LENGTH(encrypted); + + while (message_size > 0 || keep_looping) { + size_t unprotected_buffer_size_written = (size_t)(end - cur); + size_t processed_message_size = message_size; + gpr_mu_lock(&ep->protector_mu); + result = tsi_frame_protector_unprotect(ep->protector, message_bytes, + &processed_message_size, cur, + &unprotected_buffer_size_written); + gpr_mu_unlock(&ep->protector_mu); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Decryption error: %s", + tsi_result_to_string(result)); + break; + } + message_bytes += processed_message_size; + message_size -= processed_message_size; + cur += unprotected_buffer_size_written; + + if (cur == end) { + flush_read_staging_buffer(ep, &cur, &end); + /* Force to enter the loop again to extract buffered bytes in protector. + The bytes could be buffered because of running out of staging_buffer. + If this happens at the end of all slices, doing another unprotect + avoids leaving data in the protector. */ + keep_looping = 1; + } else if (unprotected_buffer_size_written > 0) { + keep_looping = 1; + } else { + keep_looping = 0; + } + } + if (result != TSI_OK) break; + } + + if (cur != GPR_SLICE_START_PTR(ep->read_staging_buffer)) { + gpr_slice_buffer_add( + ep->read_buffer, + gpr_slice_split_head( + &ep->read_staging_buffer, + (size_t)(cur - GPR_SLICE_START_PTR(ep->read_staging_buffer)))); + } + + /* TODO(yangg) experiment with moving this block after read_cb to see if it + helps latency */ + gpr_slice_buffer_reset_and_unref(&ep->source_buffer); + + if (result != TSI_OK) { + gpr_slice_buffer_reset_and_unref(ep->read_buffer); + call_read_cb(exec_ctx, ep, 0); + return; + } + + call_read_cb(exec_ctx, ep, 1); +} + +static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, + gpr_slice_buffer *slices, grpc_closure *cb) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + ep->read_cb = cb; + ep->read_buffer = slices; + gpr_slice_buffer_reset_and_unref(ep->read_buffer); + + SECURE_ENDPOINT_REF(ep, "read"); + 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); + return; + } + + grpc_endpoint_read(exec_ctx, ep->wrapped_ep, &ep->source_buffer, + &ep->on_read); +} + +static void flush_write_staging_buffer(secure_endpoint *ep, uint8_t **cur, + uint8_t **end) { + gpr_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); + ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); + *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); +} + +static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, + gpr_slice_buffer *slices, grpc_closure *cb) { + unsigned i; + tsi_result result = TSI_OK; + secure_endpoint *ep = (secure_endpoint *)secure_ep; + uint8_t *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); + uint8_t *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); + + gpr_slice_buffer_reset_and_unref(&ep->output_buffer); + + if (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); + gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data); + gpr_free(data); + } + } + + for (i = 0; i < slices->count; i++) { + gpr_slice plain = slices->slices[i]; + uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); + size_t message_size = GPR_SLICE_LENGTH(plain); + while (message_size > 0) { + size_t protected_buffer_size_to_send = (size_t)(end - cur); + size_t processed_message_size = message_size; + gpr_mu_lock(&ep->protector_mu); + result = tsi_frame_protector_protect(ep->protector, message_bytes, + &processed_message_size, cur, + &protected_buffer_size_to_send); + gpr_mu_unlock(&ep->protector_mu); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Encryption error: %s", + tsi_result_to_string(result)); + break; + } + message_bytes += processed_message_size; + message_size -= processed_message_size; + cur += protected_buffer_size_to_send; + + if (cur == end) { + flush_write_staging_buffer(ep, &cur, &end); + } + } + if (result != TSI_OK) break; + } + if (result == TSI_OK) { + size_t still_pending_size; + do { + size_t protected_buffer_size_to_send = (size_t)(end - cur); + gpr_mu_lock(&ep->protector_mu); + result = tsi_frame_protector_protect_flush(ep->protector, cur, + &protected_buffer_size_to_send, + &still_pending_size); + gpr_mu_unlock(&ep->protector_mu); + if (result != TSI_OK) break; + cur += protected_buffer_size_to_send; + if (cur == end) { + flush_write_staging_buffer(ep, &cur, &end); + } + } while (still_pending_size > 0); + if (cur != GPR_SLICE_START_PTR(ep->write_staging_buffer)) { + gpr_slice_buffer_add( + &ep->output_buffer, + gpr_slice_split_head( + &ep->write_staging_buffer, + (size_t)(cur - GPR_SLICE_START_PTR(ep->write_staging_buffer)))); + } + } + + 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); + return; + } + + grpc_endpoint_write(exec_ctx, ep->wrapped_ep, &ep->output_buffer, cb); +} + +static void endpoint_shutdown(grpc_exec_ctx *exec_ctx, + grpc_endpoint *secure_ep) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + grpc_endpoint_shutdown(exec_ctx, ep->wrapped_ep); +} + +static void endpoint_destroy(grpc_exec_ctx *exec_ctx, + grpc_endpoint *secure_ep) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + SECURE_ENDPOINT_UNREF(exec_ctx, ep, "destroy"); +} + +static void endpoint_add_to_pollset(grpc_exec_ctx *exec_ctx, + grpc_endpoint *secure_ep, + grpc_pollset *pollset) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + grpc_endpoint_add_to_pollset(exec_ctx, ep->wrapped_ep, pollset); +} + +static void endpoint_add_to_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_endpoint *secure_ep, + grpc_pollset_set *pollset_set) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + grpc_endpoint_add_to_pollset_set(exec_ctx, ep->wrapped_ep, pollset_set); +} + +static char *endpoint_get_peer(grpc_endpoint *secure_ep) { + secure_endpoint *ep = (secure_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}; + +grpc_endpoint *grpc_secure_endpoint_create( + struct tsi_frame_protector *protector, grpc_endpoint *transport, + gpr_slice *leftover_slices, size_t leftover_nslices) { + size_t i; + secure_endpoint *ep = (secure_endpoint *)gpr_malloc(sizeof(secure_endpoint)); + ep->base.vtable = &vtable; + ep->wrapped_ep = transport; + ep->protector = protector; + gpr_slice_buffer_init(&ep->leftover_bytes); + for (i = 0; i < leftover_nslices; i++) { + gpr_slice_buffer_add(&ep->leftover_bytes, + gpr_slice_ref(leftover_slices[i])); + } + ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + gpr_slice_buffer_init(&ep->output_buffer); + gpr_slice_buffer_init(&ep->source_buffer); + ep->read_buffer = NULL; + grpc_closure_init(&ep->on_read, on_read, ep); + gpr_mu_init(&ep->protector_mu); + gpr_ref_init(&ep->ref, 1); + return &ep->base; +} diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h new file mode 100644 index 0000000000..d00075b769 --- /dev/null +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -0,0 +1,49 @@ +/* + * + * 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_TRANSPORT_SECURE_ENDPOINT_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H + +#include +#include "src/core/lib/iomgr/endpoint.h" + +struct tsi_frame_protector; + +extern int grpc_trace_secure_endpoint; + +/* Takes ownership of protector and to_wrap, and refs leftover_slices. */ +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_TRANSPORT_SECURE_ENDPOINT_H */ diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c new file mode 100644 index 0000000000..72173e7c9d --- /dev/null +++ b/src/core/lib/security/transport/security_connector.c @@ -0,0 +1,838 @@ +/* + * + * 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/security_connector.h" + +#include +#include + +#include +#include +#include +#include +#include + +#include "src/core/ext/transport/chttp2/alpn/alpn.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" +#include "src/core/lib/tsi/fake_transport_security.h" +#include "src/core/lib/tsi/ssl_transport_security.h" + +/* -- Constants. -- */ + +#ifndef INSTALL_PREFIX +static const char *installed_roots_path = "/usr/share/grpc/roots.pem"; +#else +static const char *installed_roots_path = + INSTALL_PREFIX "/share/grpc/roots.pem"; +#endif + +/* -- Overridden default roots. -- */ + +static grpc_ssl_roots_override_callback ssl_roots_override_cb = NULL; + +void grpc_set_ssl_roots_override_callback(grpc_ssl_roots_override_callback cb) { + ssl_roots_override_cb = cb; +} + +/* -- Cipher suites. -- */ + +/* Defines the cipher suites that we accept by default. All these cipher suites + are compliant with HTTP2. */ +#define GRPC_SSL_CIPHER_SUITES \ + "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" \ + "SHA384:ECDHE-RSA-AES256-GCM-SHA384" + +static gpr_once cipher_suites_once = GPR_ONCE_INIT; +static const char *cipher_suites = NULL; + +static void init_cipher_suites(void) { + char *overridden = gpr_getenv("GRPC_SSL_CIPHER_SUITES"); + cipher_suites = overridden != NULL ? overridden : GRPC_SSL_CIPHER_SUITES; +} + +static const char *ssl_cipher_suites(void) { + gpr_once_init(&cipher_suites_once, init_cipher_suites); + return cipher_suites; +} + +/* -- Common methods. -- */ + +/* Returns the first property with that name. */ +const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer, + const char *name) { + size_t i; + if (peer == NULL) return NULL; + for (i = 0; i < peer->property_count; i++) { + const tsi_peer_property *property = &peer->properties[i]; + if (name == NULL && property->name == NULL) { + return property; + } + if (name != NULL && property->name != NULL && + strcmp(property->name, name) == 0) { + return property; + } + } + return NULL; +} + +void grpc_server_security_connector_shutdown( + grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector) { + grpc_security_connector_handshake_list *tmp; + gpr_mu_lock(&connector->mu); + while (connector->handshaking_handshakes) { + tmp = connector->handshaking_handshakes; + grpc_security_handshake_shutdown( + exec_ctx, connector->handshaking_handshakes->handshake); + connector->handshaking_handshakes = tmp->next; + gpr_free(tmp); + } + gpr_mu_unlock(&connector->mu); +} + +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) { + 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); + } +} + +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) { + 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); + } +} + +void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx, + grpc_security_connector *sc, + tsi_peer peer, + grpc_security_peer_check_cb cb, + void *user_data) { + if (sc == NULL) { + cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL); + tsi_peer_destruct(&peer); + } else { + sc->vtable->check_peer(exec_ctx, sc, peer, cb, user_data); + } +} + +void grpc_channel_security_connector_check_call_host( + grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, + const char *host, grpc_auth_context *auth_context, + grpc_security_call_host_check_cb cb, void *user_data) { + if (sc == NULL || sc->check_call_host == NULL) { + cb(exec_ctx, user_data, GRPC_SECURITY_ERROR); + } else { + sc->check_call_host(exec_ctx, sc, host, auth_context, cb, user_data); + } +} + +#ifdef GRPC_SECURITY_CONNECTOR_REFCOUNT_DEBUG +grpc_security_connector *grpc_security_connector_ref( + grpc_security_connector *sc, const char *file, int line, + const char *reason) { + if (sc == NULL) return NULL; + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, + "SECURITY_CONNECTOR:%p ref %d -> %d %s", sc, + (int)sc->refcount.count, (int)sc->refcount.count + 1, reason); +#else +grpc_security_connector *grpc_security_connector_ref( + grpc_security_connector *sc) { + if (sc == NULL) return NULL; +#endif + gpr_ref(&sc->refcount); + return sc; +} + +#ifdef GRPC_SECURITY_CONNECTOR_REFCOUNT_DEBUG +void grpc_security_connector_unref(grpc_security_connector *sc, + const char *file, int line, + const char *reason) { + if (sc == NULL) return; + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, + "SECURITY_CONNECTOR:%p unref %d -> %d %s", sc, + (int)sc->refcount.count, (int)sc->refcount.count - 1, reason); +#else +void grpc_security_connector_unref(grpc_security_connector *sc) { + if (sc == NULL) return; +#endif + if (gpr_unref(&sc->refcount)) sc->vtable->destroy(sc); +} + +static void connector_pointer_arg_destroy(void *p) { + GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg"); +} + +static void *connector_pointer_arg_copy(void *p) { + return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg"); +} + +static int connector_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); } + +static const grpc_arg_pointer_vtable connector_pointer_vtable = { + connector_pointer_arg_copy, connector_pointer_arg_destroy, + connector_pointer_cmp}; + +grpc_arg grpc_security_connector_to_arg(grpc_security_connector *sc) { + grpc_arg result; + result.type = GRPC_ARG_POINTER; + result.key = GRPC_SECURITY_CONNECTOR_ARG; + result.value.pointer.vtable = &connector_pointer_vtable; + result.value.pointer.p = sc; + return result; +} + +grpc_security_connector *grpc_security_connector_from_arg(const grpc_arg *arg) { + if (strcmp(arg->key, GRPC_SECURITY_CONNECTOR_ARG)) return NULL; + if (arg->type != GRPC_ARG_POINTER) { + gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, + GRPC_SECURITY_CONNECTOR_ARG); + return NULL; + } + return arg->value.pointer.p; +} + +grpc_security_connector *grpc_find_security_connector_in_args( + const grpc_channel_args *args) { + size_t i; + if (args == NULL) return NULL; + for (i = 0; i < args->num_args; i++) { + grpc_security_connector *sc = + grpc_security_connector_from_arg(&args->args[i]); + if (sc != NULL) return sc; + } + return NULL; +} + +/* -- Fake implementation. -- */ + +static void fake_channel_destroy(grpc_security_connector *sc) { + grpc_channel_security_connector *c = (grpc_channel_security_connector *)sc; + grpc_call_credentials_unref(c->request_metadata_creds); + gpr_free(sc); +} + +static void fake_server_destroy(grpc_security_connector *sc) { + grpc_server_security_connector *c = (grpc_server_security_connector *)sc; + gpr_mu_destroy(&c->mu); + gpr_free(sc); +} + +static void fake_check_peer(grpc_exec_ctx *exec_ctx, + grpc_security_connector *sc, tsi_peer peer, + grpc_security_peer_check_cb cb, void *user_data) { + const char *prop_name; + grpc_security_status status = GRPC_SECURITY_OK; + grpc_auth_context *auth_context = NULL; + if (peer.property_count != 1) { + gpr_log(GPR_ERROR, "Fake peers should only have 1 property."); + status = GRPC_SECURITY_ERROR; + goto end; + } + prop_name = peer.properties[0].name; + if (prop_name == NULL || + strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY)) { + gpr_log(GPR_ERROR, "Unexpected property in fake peer: %s.", + prop_name == NULL ? "" : prop_name); + status = GRPC_SECURITY_ERROR; + goto end; + } + if (strncmp(peer.properties[0].value.data, TSI_FAKE_CERTIFICATE_TYPE, + peer.properties[0].value.length)) { + gpr_log(GPR_ERROR, "Invalid value for cert type property."); + status = GRPC_SECURITY_ERROR; + goto end; + } + auth_context = grpc_auth_context_create(NULL); + grpc_auth_context_add_cstring_property( + auth_context, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, + GRPC_FAKE_TRANSPORT_SECURITY_TYPE); + +end: + cb(exec_ctx, user_data, status, auth_context); + grpc_auth_context_unref(auth_context); + tsi_peer_destruct(&peer); +} + +static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, + const char *host, + grpc_auth_context *auth_context, + grpc_security_call_host_check_cb cb, + void *user_data) { + cb(exec_ctx, user_data, GRPC_SECURITY_OK); +} + +static void fake_channel_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_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(1), &sc->base, + true, nonsecure_endpoint, 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, + 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); +} + +static grpc_security_connector_vtable fake_channel_vtable = { + fake_channel_destroy, fake_check_peer}; + +static grpc_security_connector_vtable fake_server_vtable = {fake_server_destroy, + fake_check_peer}; + +grpc_channel_security_connector *grpc_fake_channel_security_connector_create( + grpc_call_credentials *request_metadata_creds) { + grpc_channel_security_connector *c = gpr_malloc(sizeof(*c)); + memset(c, 0, sizeof(*c)); + gpr_ref_init(&c->base.refcount, 1); + c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; + c->base.vtable = &fake_channel_vtable; + c->request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds); + c->check_call_host = fake_channel_check_call_host; + c->do_handshake = fake_channel_do_handshake; + return c; +} + +grpc_server_security_connector *grpc_fake_server_security_connector_create( + void) { + grpc_server_security_connector *c = + gpr_malloc(sizeof(grpc_server_security_connector)); + memset(c, 0, sizeof(*c)); + gpr_ref_init(&c->base.refcount, 1); + c->base.vtable = &fake_server_vtable; + c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; + c->do_handshake = fake_server_do_handshake; + gpr_mu_init(&c->mu); + return c; +} + +/* --- Ssl implementation. --- */ + +typedef struct { + grpc_channel_security_connector base; + tsi_ssl_handshaker_factory *handshaker_factory; + char *target_name; + char *overridden_target_name; +} grpc_ssl_channel_security_connector; + +typedef struct { + grpc_server_security_connector base; + tsi_ssl_handshaker_factory *handshaker_factory; +} grpc_ssl_server_security_connector; + +static void ssl_channel_destroy(grpc_security_connector *sc) { + grpc_ssl_channel_security_connector *c = + (grpc_ssl_channel_security_connector *)sc; + grpc_call_credentials_unref(c->base.request_metadata_creds); + if (c->handshaker_factory != NULL) { + tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); + } + if (c->target_name != NULL) gpr_free(c->target_name); + if (c->overridden_target_name != NULL) gpr_free(c->overridden_target_name); + gpr_free(sc); +} + +static void ssl_server_destroy(grpc_security_connector *sc) { + grpc_ssl_server_security_connector *c = + (grpc_ssl_server_security_connector *)sc; + + if (c->handshaker_factory != NULL) { + tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); + } + gpr_mu_destroy(&c->base.mu); + gpr_free(sc); +} + +static grpc_security_status ssl_create_handshaker( + tsi_ssl_handshaker_factory *handshaker_factory, bool is_client, + const char *peer_name, tsi_handshaker **handshaker) { + tsi_result result = TSI_OK; + if (handshaker_factory == NULL) return GRPC_SECURITY_ERROR; + result = tsi_ssl_handshaker_factory_create_handshaker( + handshaker_factory, is_client ? peer_name : NULL, handshaker); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", + tsi_result_to_string(result)); + return GRPC_SECURITY_ERROR; + } + return GRPC_SECURITY_OK; +} + +static void ssl_channel_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_ssl_channel_security_connector *c = + (grpc_ssl_channel_security_connector *)sc; + tsi_handshaker *handshaker; + grpc_security_status status = ssl_create_handshaker( + c->handshaker_factory, true, + c->overridden_target_name != NULL ? c->overridden_target_name + : c->target_name, + &handshaker); + if (status != GRPC_SECURITY_OK) { + cb(exec_ctx, user_data, status, NULL, NULL); + } else { + grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, + nonsecure_endpoint, cb, user_data); + } +} + +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, + grpc_security_handshake_done_cb cb, + void *user_data) { + grpc_ssl_server_security_connector *c = + (grpc_ssl_server_security_connector *)sc; + tsi_handshaker *handshaker; + grpc_security_status status = + ssl_create_handshaker(c->handshaker_factory, false, NULL, &handshaker); + if (status != GRPC_SECURITY_OK) { + cb(exec_ctx, user_data, status, NULL, NULL); + } else { + grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, false, + nonsecure_endpoint, cb, user_data); + } +} + +static int ssl_host_matches_name(const tsi_peer *peer, const char *peer_name) { + char *allocated_name = NULL; + int r; + + if (strchr(peer_name, ':') != NULL) { + char *ignored_port; + gpr_split_host_port(peer_name, &allocated_name, &ignored_port); + gpr_free(ignored_port); + peer_name = allocated_name; + if (!peer_name) return 0; + } + r = tsi_ssl_peer_matches_name(peer, peer_name); + gpr_free(allocated_name); + return r; +} + +grpc_auth_context *tsi_ssl_peer_to_auth_context(const tsi_peer *peer) { + size_t i; + grpc_auth_context *ctx = NULL; + const char *peer_identity_property_name = NULL; + + /* The caller has checked the certificate type property. */ + GPR_ASSERT(peer->property_count >= 1); + ctx = grpc_auth_context_create(NULL); + grpc_auth_context_add_cstring_property( + ctx, GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME, + GRPC_SSL_TRANSPORT_SECURITY_TYPE); + for (i = 0; i < peer->property_count; i++) { + const tsi_peer_property *prop = &peer->properties[i]; + if (prop->name == NULL) continue; + if (strcmp(prop->name, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY) == 0) { + /* If there is no subject alt name, have the CN as the identity. */ + if (peer_identity_property_name == NULL) { + peer_identity_property_name = GRPC_X509_CN_PROPERTY_NAME; + } + grpc_auth_context_add_property(ctx, GRPC_X509_CN_PROPERTY_NAME, + prop->value.data, prop->value.length); + } else if (strcmp(prop->name, + TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY) == 0) { + peer_identity_property_name = GRPC_X509_SAN_PROPERTY_NAME; + grpc_auth_context_add_property(ctx, GRPC_X509_SAN_PROPERTY_NAME, + prop->value.data, prop->value.length); + } else if (strcmp(prop->name, TSI_X509_PEM_CERT_PROPERTY) == 0) { + grpc_auth_context_add_property(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME, + prop->value.data, prop->value.length); + } + } + if (peer_identity_property_name != NULL) { + GPR_ASSERT(grpc_auth_context_set_peer_identity_property_name( + ctx, peer_identity_property_name) == 1); + } + return ctx; +} + +static grpc_security_status ssl_check_peer(grpc_security_connector *sc, + const char *peer_name, + const tsi_peer *peer, + grpc_auth_context **auth_context) { + /* Check the ALPN. */ + const tsi_peer_property *p = + tsi_peer_get_property_by_name(peer, TSI_SSL_ALPN_SELECTED_PROTOCOL); + if (p == NULL) { + gpr_log(GPR_ERROR, "Missing selected ALPN property."); + return GRPC_SECURITY_ERROR; + } + if (!grpc_chttp2_is_alpn_version_supported(p->value.data, p->value.length)) { + gpr_log(GPR_ERROR, "Invalid ALPN value."); + return GRPC_SECURITY_ERROR; + } + + /* Check the peer name if specified. */ + if (peer_name != NULL && !ssl_host_matches_name(peer, peer_name)) { + gpr_log(GPR_ERROR, "Peer name %s is not in peer certificate", peer_name); + return GRPC_SECURITY_ERROR; + } + *auth_context = tsi_ssl_peer_to_auth_context(peer); + return GRPC_SECURITY_OK; +} + +static void ssl_channel_check_peer(grpc_exec_ctx *exec_ctx, + grpc_security_connector *sc, tsi_peer peer, + grpc_security_peer_check_cb cb, + void *user_data) { + grpc_ssl_channel_security_connector *c = + (grpc_ssl_channel_security_connector *)sc; + grpc_security_status status; + grpc_auth_context *auth_context = NULL; + status = ssl_check_peer(sc, c->overridden_target_name != NULL + ? c->overridden_target_name + : c->target_name, + &peer, &auth_context); + cb(exec_ctx, user_data, status, auth_context); + grpc_auth_context_unref(auth_context); + tsi_peer_destruct(&peer); +} + +static void ssl_server_check_peer(grpc_exec_ctx *exec_ctx, + grpc_security_connector *sc, tsi_peer peer, + grpc_security_peer_check_cb cb, + void *user_data) { + grpc_auth_context *auth_context = NULL; + grpc_security_status status = ssl_check_peer(sc, NULL, &peer, &auth_context); + tsi_peer_destruct(&peer); + cb(exec_ctx, user_data, status, auth_context); + grpc_auth_context_unref(auth_context); +} + +static void add_shallow_auth_property_to_peer(tsi_peer *peer, + const grpc_auth_property *prop, + const char *tsi_prop_name) { + tsi_peer_property *tsi_prop = &peer->properties[peer->property_count++]; + tsi_prop->name = (char *)tsi_prop_name; + tsi_prop->value.data = prop->value; + tsi_prop->value.length = prop->value_length; +} + +tsi_peer tsi_shallow_peer_from_ssl_auth_context( + const grpc_auth_context *auth_context) { + size_t max_num_props = 0; + grpc_auth_property_iterator it; + const grpc_auth_property *prop; + tsi_peer peer; + memset(&peer, 0, sizeof(peer)); + + it = grpc_auth_context_property_iterator(auth_context); + while (grpc_auth_property_iterator_next(&it) != NULL) max_num_props++; + + if (max_num_props > 0) { + peer.properties = gpr_malloc(max_num_props * sizeof(tsi_peer_property)); + it = grpc_auth_context_property_iterator(auth_context); + while ((prop = grpc_auth_property_iterator_next(&it)) != NULL) { + if (strcmp(prop->name, GRPC_X509_SAN_PROPERTY_NAME) == 0) { + add_shallow_auth_property_to_peer( + &peer, prop, TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY); + } else if (strcmp(prop->name, GRPC_X509_CN_PROPERTY_NAME) == 0) { + add_shallow_auth_property_to_peer( + &peer, prop, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY); + } else if (strcmp(prop->name, GRPC_X509_PEM_CERT_PROPERTY_NAME) == 0) { + add_shallow_auth_property_to_peer(&peer, prop, + TSI_X509_PEM_CERT_PROPERTY); + } + } + } + return peer; +} + +void tsi_shallow_peer_destruct(tsi_peer *peer) { + if (peer->properties != NULL) gpr_free(peer->properties); +} + +static void ssl_channel_check_call_host(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, + const char *host, + grpc_auth_context *auth_context, + grpc_security_call_host_check_cb cb, + void *user_data) { + grpc_ssl_channel_security_connector *c = + (grpc_ssl_channel_security_connector *)sc; + grpc_security_status status = GRPC_SECURITY_ERROR; + tsi_peer peer = tsi_shallow_peer_from_ssl_auth_context(auth_context); + if (ssl_host_matches_name(&peer, host)) status = GRPC_SECURITY_OK; + + /* If the target name was overridden, then the original target_name was + 'checked' transitively during the previous peer check at the end of the + handshake. */ + if (c->overridden_target_name != NULL && strcmp(host, c->target_name) == 0) { + status = GRPC_SECURITY_OK; + } + cb(exec_ctx, user_data, status); + tsi_shallow_peer_destruct(&peer); +} + +static grpc_security_connector_vtable ssl_channel_vtable = { + ssl_channel_destroy, ssl_channel_check_peer}; + +static grpc_security_connector_vtable ssl_server_vtable = { + ssl_server_destroy, ssl_server_check_peer}; + +static gpr_slice compute_default_pem_root_certs_once(void) { + gpr_slice result = gpr_empty_slice(); + + /* First try to load the roots from the environment. */ + char *default_root_certs_path = + gpr_getenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR); + if (default_root_certs_path != NULL) { + result = gpr_load_file(default_root_certs_path, 0, NULL); + gpr_free(default_root_certs_path); + } + + /* Try overridden roots if needed. */ + grpc_ssl_roots_override_result ovrd_res = GRPC_SSL_ROOTS_OVERRIDE_FAIL; + if (GPR_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != NULL) { + char *pem_root_certs = NULL; + ovrd_res = ssl_roots_override_cb(&pem_root_certs); + if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { + GPR_ASSERT(pem_root_certs != NULL); + result = gpr_slice_new(pem_root_certs, strlen(pem_root_certs), gpr_free); + } + } + + /* Fall back to installed certs if needed. */ + if (GPR_SLICE_IS_EMPTY(result) && + ovrd_res != GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY) { + result = gpr_load_file(installed_roots_path, 0, NULL); + } + return result; +} + +static gpr_slice default_pem_root_certs; + +static void init_default_pem_root_certs(void) { + default_pem_root_certs = compute_default_pem_root_certs_once(); +} + +gpr_slice grpc_get_default_ssl_roots_for_testing(void) { + return compute_default_pem_root_certs_once(); +} + +static tsi_client_certificate_request_type +get_tsi_client_certificate_request_type( + grpc_ssl_client_certificate_request_type grpc_request_type) { + switch (grpc_request_type) { + case GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE: + return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; + + case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + return TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; + + case GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY: + return TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY; + + case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: + return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY; + + case GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY: + return TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY; + + default: + // Is this a sane default + return TSI_DONT_REQUEST_CLIENT_CERTIFICATE; + } +} + +size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) { + /* TODO(jboeuf@google.com): Maybe revisit the approach which consists in + loading all the roots once for the lifetime of the process. */ + static gpr_once once = GPR_ONCE_INIT; + gpr_once_init(&once, init_default_pem_root_certs); + *pem_root_certs = GPR_SLICE_START_PTR(default_pem_root_certs); + return GPR_SLICE_LENGTH(default_pem_root_certs); +} + +grpc_security_status grpc_ssl_channel_security_connector_create( + grpc_call_credentials *request_metadata_creds, + const grpc_ssl_config *config, const char *target_name, + const char *overridden_target_name, grpc_channel_security_connector **sc) { + size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions(); + const unsigned char **alpn_protocol_strings = + gpr_malloc(sizeof(const char *) * num_alpn_protocols); + unsigned char *alpn_protocol_string_lengths = + gpr_malloc(sizeof(unsigned char) * num_alpn_protocols); + tsi_result result = TSI_OK; + grpc_ssl_channel_security_connector *c; + size_t i; + const unsigned char *pem_root_certs; + size_t pem_root_certs_size; + char *port; + + for (i = 0; i < num_alpn_protocols; i++) { + alpn_protocol_strings[i] = + (const unsigned char *)grpc_chttp2_get_alpn_version_index(i); + alpn_protocol_string_lengths[i] = + (unsigned char)strlen(grpc_chttp2_get_alpn_version_index(i)); + } + + if (config == NULL || target_name == NULL) { + gpr_log(GPR_ERROR, "An ssl channel needs a config and a target name."); + goto error; + } + if (config->pem_root_certs == NULL) { + pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs); + if (pem_root_certs == NULL || pem_root_certs_size == 0) { + gpr_log(GPR_ERROR, "Could not get default pem root certs."); + goto error; + } + } else { + pem_root_certs = config->pem_root_certs; + pem_root_certs_size = config->pem_root_certs_size; + } + + c = gpr_malloc(sizeof(grpc_ssl_channel_security_connector)); + memset(c, 0, sizeof(grpc_ssl_channel_security_connector)); + + gpr_ref_init(&c->base.base.refcount, 1); + c->base.base.vtable = &ssl_channel_vtable; + c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; + c->base.request_metadata_creds = + grpc_call_credentials_ref(request_metadata_creds); + c->base.check_call_host = ssl_channel_check_call_host; + c->base.do_handshake = ssl_channel_do_handshake; + gpr_split_host_port(target_name, &c->target_name, &port); + gpr_free(port); + if (overridden_target_name != NULL) { + c->overridden_target_name = gpr_strdup(overridden_target_name); + } + result = tsi_create_ssl_client_handshaker_factory( + config->pem_private_key, config->pem_private_key_size, + config->pem_cert_chain, config->pem_cert_chain_size, pem_root_certs, + pem_root_certs_size, ssl_cipher_suites(), alpn_protocol_strings, + alpn_protocol_string_lengths, (uint16_t)num_alpn_protocols, + &c->handshaker_factory); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", + tsi_result_to_string(result)); + ssl_channel_destroy(&c->base.base); + *sc = NULL; + goto error; + } + *sc = &c->base; + gpr_free((void *)alpn_protocol_strings); + gpr_free(alpn_protocol_string_lengths); + return GRPC_SECURITY_OK; + +error: + gpr_free((void *)alpn_protocol_strings); + gpr_free(alpn_protocol_string_lengths); + return GRPC_SECURITY_ERROR; +} + +grpc_security_status grpc_ssl_server_security_connector_create( + const grpc_ssl_server_config *config, grpc_server_security_connector **sc) { + size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions(); + const unsigned char **alpn_protocol_strings = + gpr_malloc(sizeof(const char *) * num_alpn_protocols); + unsigned char *alpn_protocol_string_lengths = + gpr_malloc(sizeof(unsigned char) * num_alpn_protocols); + tsi_result result = TSI_OK; + grpc_ssl_server_security_connector *c; + size_t i; + + for (i = 0; i < num_alpn_protocols; i++) { + alpn_protocol_strings[i] = + (const unsigned char *)grpc_chttp2_get_alpn_version_index(i); + alpn_protocol_string_lengths[i] = + (unsigned char)strlen(grpc_chttp2_get_alpn_version_index(i)); + } + + if (config == NULL || config->num_key_cert_pairs == 0) { + gpr_log(GPR_ERROR, "An SSL server needs a key and a cert."); + goto error; + } + c = gpr_malloc(sizeof(grpc_ssl_server_security_connector)); + memset(c, 0, sizeof(grpc_ssl_server_security_connector)); + + gpr_ref_init(&c->base.base.refcount, 1); + c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; + c->base.base.vtable = &ssl_server_vtable; + result = tsi_create_ssl_server_handshaker_factory_ex( + (const unsigned char **)config->pem_private_keys, + config->pem_private_keys_sizes, + (const unsigned char **)config->pem_cert_chains, + config->pem_cert_chains_sizes, config->num_key_cert_pairs, + config->pem_root_certs, config->pem_root_certs_size, + get_tsi_client_certificate_request_type( + config->client_certificate_request), + ssl_cipher_suites(), alpn_protocol_strings, alpn_protocol_string_lengths, + (uint16_t)num_alpn_protocols, &c->handshaker_factory); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", + tsi_result_to_string(result)); + ssl_server_destroy(&c->base.base); + *sc = NULL; + goto error; + } + gpr_mu_init(&c->base.mu); + c->base.do_handshake = ssl_server_do_handshake; + *sc = &c->base; + gpr_free((void *)alpn_protocol_strings); + gpr_free(alpn_protocol_string_lengths); + return GRPC_SECURITY_OK; + +error: + gpr_free((void *)alpn_protocol_strings); + gpr_free(alpn_protocol_string_lengths); + return GRPC_SECURITY_ERROR; +} diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h new file mode 100644 index 0000000000..84e586deaa --- /dev/null +++ b/src/core/lib/security/transport/security_connector.h @@ -0,0 +1,266 @@ +/* + * + * 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_TRANSPORT_SECURITY_CONNECTOR_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H + +#include +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/lib/tsi/transport_security_interface.h" + +/* --- status enum. --- */ + +typedef enum { GRPC_SECURITY_OK = 0, GRPC_SECURITY_ERROR } grpc_security_status; + +/* --- URL schemes. --- */ + +#define GRPC_SSL_URL_SCHEME "https" +#define GRPC_FAKE_SECURITY_URL_SCHEME "http+fake_security" + +/* --- security_connector object. --- + + A security connector object represents away to configure the underlying + transport security mechanism and check the resulting trusted peer. */ + +typedef struct grpc_security_connector grpc_security_connector; + +#define GRPC_SECURITY_CONNECTOR_ARG "grpc.security_connector" + +typedef void (*grpc_security_peer_check_cb)(grpc_exec_ctx *exec_ctx, + void *user_data, + grpc_security_status status, + grpc_auth_context *auth_context); + +/* Ownership of the secure_endpoint is transfered. */ +typedef void (*grpc_security_handshake_done_cb)( + grpc_exec_ctx *exec_ctx, void *user_data, grpc_security_status status, + grpc_endpoint *secure_endpoint, grpc_auth_context *auth_context); + +typedef struct { + void (*destroy)(grpc_security_connector *sc); + void (*check_peer)(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, + tsi_peer peer, grpc_security_peer_check_cb cb, + void *user_data); +} grpc_security_connector_vtable; + +typedef struct grpc_security_connector_handshake_list { + void *handshake; + struct grpc_security_connector_handshake_list *next; +} grpc_security_connector_handshake_list; + +struct grpc_security_connector { + const grpc_security_connector_vtable *vtable; + gpr_refcount refcount; + const char *url_scheme; +}; + +/* Refcounting. */ +#ifdef GRPC_SECURITY_CONNECTOR_REFCOUNT_DEBUG +#define GRPC_SECURITY_CONNECTOR_REF(p, r) \ + grpc_security_connector_ref((p), __FILE__, __LINE__, (r)) +#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) \ + grpc_security_connector_unref((p), __FILE__, __LINE__, (r)) +grpc_security_connector *grpc_security_connector_ref( + grpc_security_connector *policy, const char *file, int line, + const char *reason); +void grpc_security_connector_unref(grpc_security_connector *policy, + const char *file, int line, + const char *reason); +#else +#define GRPC_SECURITY_CONNECTOR_REF(p, r) grpc_security_connector_ref((p)) +#define GRPC_SECURITY_CONNECTOR_UNREF(p, r) grpc_security_connector_unref((p)) +grpc_security_connector *grpc_security_connector_ref( + grpc_security_connector *policy); +void grpc_security_connector_unref(grpc_security_connector *policy); +#endif + +/* Check the peer. Callee takes ownership of the peer object. + The callback will include the resulting auth_context. */ +void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx, + grpc_security_connector *sc, + tsi_peer peer, + grpc_security_peer_check_cb cb, + void *user_data); + +/* Util to encapsulate the connector in a channel arg. */ +grpc_arg grpc_security_connector_to_arg(grpc_security_connector *sc); + +/* Util to get the connector from a channel arg. */ +grpc_security_connector *grpc_security_connector_from_arg(const grpc_arg *arg); + +/* Util to find the connector from channel args. */ +grpc_security_connector *grpc_find_security_connector_in_args( + const grpc_channel_args *args); + +/* --- channel_security_connector object. --- + + A channel security connector object represents away to configure the + underlying transport security mechanism on the client side. */ + +typedef struct grpc_channel_security_connector grpc_channel_security_connector; + +typedef void (*grpc_security_call_host_check_cb)(grpc_exec_ctx *exec_ctx, + void *user_data, + grpc_security_status status); + +struct grpc_channel_security_connector { + grpc_security_connector base; + grpc_call_credentials *request_metadata_creds; + void (*check_call_host)(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, const char *host, + grpc_auth_context *auth_context, + 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_security_handshake_done_cb cb, void *user_data); +}; + +/* Checks that the host that will be set for a call is acceptable. */ +void grpc_channel_security_connector_check_call_host( + grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, + const char *host, grpc_auth_context *auth_context, + grpc_security_call_host_check_cb cb, void *user_data); + +/* 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); + +/* --- server_security_connector object. --- + + A server security connector object represents away to configure the + underlying transport security mechanism on the server side. */ + +typedef struct grpc_server_security_connector grpc_server_security_connector; + +struct grpc_server_security_connector { + grpc_security_connector base; + gpr_mu mu; + grpc_security_connector_handshake_list *handshaking_handshakes; + const grpc_channel_args *channel_args; + void (*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); +}; + +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); + +void grpc_server_security_connector_shutdown( + grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector); + +/* --- Creation security connectors. --- */ + +/* For TESTING ONLY! + Creates a fake connector that emulates real channel security. */ +grpc_channel_security_connector *grpc_fake_channel_security_connector_create( + grpc_call_credentials *request_metadata_creds); + +/* For TESTING ONLY! + Creates a fake connector that emulates real server security. */ +grpc_server_security_connector *grpc_fake_server_security_connector_create( + void); + +/* Config for ssl clients. */ +typedef struct { + unsigned char *pem_private_key; + size_t pem_private_key_size; + unsigned char *pem_cert_chain; + size_t pem_cert_chain_size; + unsigned char *pem_root_certs; + size_t pem_root_certs_size; +} grpc_ssl_config; + +/* Creates an SSL channel_security_connector. + - request_metadata_creds is the credentials object which metadata + will be sent with each request. This parameter can be NULL. + - config is the SSL config to be used for the SSL channel establishment. + - is_client should be 0 for a server or a non-0 value for a client. + - secure_peer_name is the secure peer name that should be checked in + grpc_channel_security_connector_check_peer. This parameter may be NULL in + which case the peer name will not be checked. Note that if this parameter + is not NULL, then, pem_root_certs should not be NULL either. + - sc is a pointer on the connector to be created. + This function returns GRPC_SECURITY_OK in case of success or a + specific error code otherwise. +*/ +grpc_security_status grpc_ssl_channel_security_connector_create( + grpc_call_credentials *request_metadata_creds, + const grpc_ssl_config *config, const char *target_name, + const char *overridden_target_name, grpc_channel_security_connector **sc); + +/* Gets the default ssl roots. */ +size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs); + +/* Exposed for TESTING ONLY!. */ +gpr_slice grpc_get_default_ssl_roots_for_testing(void); + +/* Config for ssl servers. */ +typedef struct { + unsigned char **pem_private_keys; + size_t *pem_private_keys_sizes; + unsigned char **pem_cert_chains; + size_t *pem_cert_chains_sizes; + size_t num_key_cert_pairs; + unsigned char *pem_root_certs; + size_t pem_root_certs_size; + grpc_ssl_client_certificate_request_type client_certificate_request; +} grpc_ssl_server_config; + +/* Creates an SSL server_security_connector. + - config is the SSL config to be used for the SSL channel establishment. + - sc is a pointer on the connector to be created. + This function returns GRPC_SECURITY_OK in case of success or a + specific error code otherwise. +*/ +grpc_security_status grpc_ssl_server_security_connector_create( + const grpc_ssl_server_config *config, grpc_server_security_connector **sc); + +/* Util. */ +const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer, + const char *name); + +/* Exposed for testing only. */ +grpc_auth_context *tsi_ssl_peer_to_auth_context(const tsi_peer *peer); +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_TRANSPORT_SECURITY_CONNECTOR_H */ diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c new file mode 100644 index 0000000000..006a30f0c6 --- /dev/null +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -0,0 +1,264 @@ +/* + * + * 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 "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 + +typedef struct call_data { + grpc_metadata_batch *recv_initial_metadata; + /* Closure to call when finished with the auth_on_recv hook. */ + grpc_closure *on_done_recv; + /* Receive closures are chained: we inject this closure as the on_done_recv + up-call on transport_op, and remember to call our on_done_recv member after + handling it. */ + grpc_closure auth_on_recv; + grpc_transport_stream_op transport_op; + grpc_metadata_array md; + const grpc_metadata *consumed_md; + size_t num_consumed_md; + grpc_auth_context *auth_context; +} call_data; + +typedef struct channel_data { + grpc_auth_context *auth_context; + grpc_server_credentials *creds; +} channel_data; + +static grpc_metadata_array metadata_batch_to_md_array( + const grpc_metadata_batch *batch) { + grpc_linked_mdelem *l; + grpc_metadata_array result; + grpc_metadata_array_init(&result); + for (l = batch->list.head; l != NULL; l = l->next) { + grpc_metadata *usr_md = NULL; + grpc_mdelem *md = l->md; + grpc_mdstr *key = md->key; + grpc_mdstr *value = md->value; + if (result.count == result.capacity) { + result.capacity = GPR_MAX(result.capacity + 8, result.capacity * 2); + result.metadata = + gpr_realloc(result.metadata, result.capacity * sizeof(grpc_metadata)); + } + usr_md = &result.metadata[result.count++]; + usr_md->key = grpc_mdstr_as_c_string(key); + usr_md->value = grpc_mdstr_as_c_string(value); + usr_md->value_length = GPR_SLICE_LENGTH(value->slice); + } + return result; +} + +static grpc_mdelem *remove_consumed_md(void *user_data, grpc_mdelem *md) { + grpc_call_element *elem = user_data; + call_data *calld = elem->call_data; + size_t i; + for (i = 0; i < calld->num_consumed_md; i++) { + const grpc_metadata *consumed_md = &calld->consumed_md[i]; + /* Maybe we could do a pointer comparison but we do not have any guarantee + that the metadata processor used the same pointers for consumed_md in the + callback. */ + if (GPR_SLICE_LENGTH(md->key->slice) != strlen(consumed_md->key) || + GPR_SLICE_LENGTH(md->value->slice) != consumed_md->value_length) { + continue; + } + if (memcmp(GPR_SLICE_START_PTR(md->key->slice), consumed_md->key, + GPR_SLICE_LENGTH(md->key->slice)) == 0 && + memcmp(GPR_SLICE_START_PTR(md->value->slice), consumed_md->value, + GPR_SLICE_LENGTH(md->value->slice)) == 0) { + return NULL; /* Delete. */ + } + } + return md; +} + +/* called from application code */ +static void on_md_processing_done( + void *user_data, const grpc_metadata *consumed_md, size_t num_consumed_md, + const grpc_metadata *response_md, size_t num_response_md, + grpc_status_code status, const char *error_details) { + grpc_call_element *elem = user_data; + call_data *calld = elem->call_data; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + /* TODO(jboeuf): Implement support for response_md. */ + if (response_md != NULL && num_response_md > 0) { + gpr_log(GPR_INFO, + "response_md in auth metadata processing not supported for now. " + "Ignoring..."); + } + + if (status == GRPC_STATUS_OK) { + calld->consumed_md = consumed_md; + calld->num_consumed_md = num_consumed_md; + 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); + } else { + gpr_slice message; + grpc_transport_stream_op close_op; + memset(&close_op, 0, sizeof(close_op)); + grpc_metadata_array_destroy(&calld->md); + error_details = error_details != NULL + ? error_details + : "Authentication metadata processing failed."; + message = gpr_slice_from_copied_string(error_details); + calld->transport_op.send_initial_metadata = NULL; + if (calld->transport_op.send_message != NULL) { + grpc_byte_stream_destroy(&exec_ctx, calld->transport_op.send_message); + calld->transport_op.send_message = NULL; + } + 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_finish(&exec_ctx); +} + +static void auth_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, + bool success) { + grpc_call_element *elem = user_data; + call_data *calld = elem->call_data; + channel_data *chand = elem->channel_data; + if (success) { + if (chand->creds->processor.process != NULL) { + calld->md = metadata_batch_to_md_array(calld->recv_initial_metadata); + chand->creds->processor.process( + chand->creds->processor.state, calld->auth_context, + calld->md.metadata, calld->md.count, on_md_processing_done, elem); + return; + } + } + calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, success); +} + +static void set_recv_ops_md_callbacks(grpc_call_element *elem, + grpc_transport_stream_op *op) { + call_data *calld = elem->call_data; + + if (op->recv_initial_metadata != NULL) { + /* substitute our callback for the higher callback */ + calld->recv_initial_metadata = op->recv_initial_metadata; + calld->on_done_recv = op->recv_initial_metadata_ready; + op->recv_initial_metadata_ready = &calld->auth_on_recv; + calld->transport_op = *op; + } +} + +/* Called either: + - in response to an API call (or similar) from above, to send something + - a network event (or similar) from below, to receive something + op contains type and call direction information, in addition to the data + that is being sent or received. */ +static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_transport_stream_op *op) { + set_recv_ops_md_callbacks(elem, op); + grpc_call_next_op(exec_ctx, elem, op); +} + +/* 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; + channel_data *chand = elem->channel_data; + grpc_server_security_context *server_ctx = NULL; + + /* initialize members */ + memset(calld, 0, sizeof(*calld)); + grpc_closure_init(&calld->auth_on_recv, auth_on_recv, elem); + + if (args->context[GRPC_CONTEXT_SECURITY].value != NULL) { + args->context[GRPC_CONTEXT_SECURITY].destroy( + args->context[GRPC_CONTEXT_SECURITY].value); + } + + server_ctx = grpc_server_security_context_create(); + server_ctx->auth_context = grpc_auth_context_create(chand->auth_context); + calld->auth_context = server_ctx->auth_context; + + args->context[GRPC_CONTEXT_SECURITY].value = server_ctx; + args->context[GRPC_CONTEXT_SECURITY].destroy = + 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, + void *ignored) {} + +/* Constructor for channel_data */ +static void init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { + grpc_auth_context *auth_context = + grpc_find_auth_context_in_args(args->channel_args); + grpc_server_credentials *creds = + grpc_find_server_credentials_in_args(args->channel_args); + /* grab pointers to our data from the channel element */ + channel_data *chand = elem->channel_data; + + GPR_ASSERT(!args->is_last); + GPR_ASSERT(auth_context != NULL); + GPR_ASSERT(creds != NULL); + + /* initialize members */ + chand->auth_context = + GRPC_AUTH_CONTEXT_REF(auth_context, "server_auth_filter"); + chand->creds = grpc_server_credentials_ref(creds); +} + +/* Destructor for channel data */ +static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem) { + /* grab pointers to our data from the channel element */ + channel_data *chand = elem->channel_data; + GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "server_auth_filter"); + grpc_server_credentials_unref(chand->creds); +} + +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"}; diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c new file mode 100644 index 0000000000..9da42e4e73 --- /dev/null +++ b/src/core/lib/security/util/b64.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/util/b64.h" + +#include +#include + +#include +#include +#include + +/* --- Constants. --- */ + +static const int8_t base64_bytes[] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 0x3E, -1, -1, -1, 0x3F, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, -1, -1, + -1, 0x7F, -1, -1, -1, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, + 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, -1, -1, -1, -1, -1, + -1, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, + 0x31, 0x32, 0x33, -1, -1, -1, -1, -1}; + +static const char base64_url_unsafe_chars[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static const char base64_url_safe_chars[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; + +#define GRPC_BASE64_PAD_CHAR '=' +#define GRPC_BASE64_PAD_BYTE 0x7F +#define GRPC_BASE64_MULTILINE_LINE_LEN 76 +#define GRPC_BASE64_MULTILINE_NUM_BLOCKS (GRPC_BASE64_MULTILINE_LINE_LEN / 4) + +/* --- base64 functions. --- */ + +char *grpc_base64_encode(const void *vdata, size_t data_size, int url_safe, + int multiline) { + const unsigned char *data = vdata; + const char *base64_chars = + url_safe ? base64_url_safe_chars : base64_url_unsafe_chars; + size_t result_projected_size = + 4 * ((data_size + 3) / 3) + + 2 * (multiline ? (data_size / (3 * GRPC_BASE64_MULTILINE_NUM_BLOCKS)) + : 0) + + 1; + char *result = gpr_malloc(result_projected_size); + char *current = result; + size_t num_blocks = 0; + size_t i = 0; + + /* Encode each block. */ + while (data_size >= 3) { + *current++ = base64_chars[(data[i] >> 2) & 0x3F]; + *current++ = + base64_chars[((data[i] & 0x03) << 4) | ((data[i + 1] >> 4) & 0x0F)]; + *current++ = + base64_chars[((data[i + 1] & 0x0F) << 2) | ((data[i + 2] >> 6) & 0x03)]; + *current++ = base64_chars[data[i + 2] & 0x3F]; + + data_size -= 3; + i += 3; + if (multiline && (++num_blocks == GRPC_BASE64_MULTILINE_NUM_BLOCKS)) { + *current++ = '\r'; + *current++ = '\n'; + num_blocks = 0; + } + } + + /* Take care of the tail. */ + if (data_size == 2) { + *current++ = base64_chars[(data[i] >> 2) & 0x3F]; + *current++ = + base64_chars[((data[i] & 0x03) << 4) | ((data[i + 1] >> 4) & 0x0F)]; + *current++ = base64_chars[(data[i + 1] & 0x0F) << 2]; + *current++ = GRPC_BASE64_PAD_CHAR; + } else if (data_size == 1) { + *current++ = base64_chars[(data[i] >> 2) & 0x3F]; + *current++ = base64_chars[(data[i] & 0x03) << 4]; + *current++ = GRPC_BASE64_PAD_CHAR; + *current++ = GRPC_BASE64_PAD_CHAR; + } + + GPR_ASSERT(current >= result); + GPR_ASSERT((uintptr_t)(current - result) < result_projected_size); + result[current - result] = '\0'; + return result; +} + +gpr_slice grpc_base64_decode(const char *b64, int url_safe) { + return grpc_base64_decode_with_len(b64, strlen(b64), url_safe); +} + +static void decode_one_char(const unsigned char *codes, unsigned char *result, + size_t *result_offset) { + uint32_t packed = ((uint32_t)codes[0] << 2) | ((uint32_t)codes[1] >> 4); + result[(*result_offset)++] = (unsigned char)packed; +} + +static void decode_two_chars(const unsigned char *codes, unsigned char *result, + size_t *result_offset) { + uint32_t packed = ((uint32_t)codes[0] << 10) | ((uint32_t)codes[1] << 4) | + ((uint32_t)codes[2] >> 2); + result[(*result_offset)++] = (unsigned char)(packed >> 8); + result[(*result_offset)++] = (unsigned char)(packed); +} + +static int decode_group(const unsigned char *codes, size_t num_codes, + unsigned char *result, size_t *result_offset) { + GPR_ASSERT(num_codes <= 4); + + /* Short end groups that may not have padding. */ + if (num_codes == 1) { + gpr_log(GPR_ERROR, "Invalid group. Must be at least 2 bytes."); + return 0; + } + if (num_codes == 2) { + decode_one_char(codes, result, result_offset); + return 1; + } + if (num_codes == 3) { + decode_two_chars(codes, result, result_offset); + return 1; + } + + /* Regular 4 byte groups with padding or not. */ + GPR_ASSERT(num_codes == 4); + if (codes[0] == GRPC_BASE64_PAD_BYTE || codes[1] == GRPC_BASE64_PAD_BYTE) { + gpr_log(GPR_ERROR, "Invalid padding detected."); + return 0; + } + if (codes[2] == GRPC_BASE64_PAD_BYTE) { + if (codes[3] == GRPC_BASE64_PAD_BYTE) { + decode_one_char(codes, result, result_offset); + } else { + gpr_log(GPR_ERROR, "Invalid padding detected."); + return 0; + } + } else if (codes[3] == GRPC_BASE64_PAD_BYTE) { + decode_two_chars(codes, result, result_offset); + } else { + /* No padding. */ + uint32_t packed = ((uint32_t)codes[0] << 18) | ((uint32_t)codes[1] << 12) | + ((uint32_t)codes[2] << 6) | codes[3]; + result[(*result_offset)++] = (unsigned char)(packed >> 16); + result[(*result_offset)++] = (unsigned char)(packed >> 8); + result[(*result_offset)++] = (unsigned char)(packed); + } + return 1; +} + +gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, + int url_safe) { + gpr_slice result = gpr_slice_malloc(b64_len); + unsigned char *current = GPR_SLICE_START_PTR(result); + size_t result_size = 0; + unsigned char codes[4]; + size_t num_codes = 0; + + while (b64_len--) { + unsigned char c = (unsigned char)(*b64++); + signed char code; + if (c >= GPR_ARRAY_SIZE(base64_bytes)) continue; + if (url_safe) { + if (c == '+' || c == '/') { + gpr_log(GPR_ERROR, "Invalid character for url safe base64 %c", c); + goto fail; + } + if (c == '-') { + c = '+'; + } else if (c == '_') { + c = '/'; + } + } + code = base64_bytes[c]; + if (code == -1) { + if (c != '\r' && c != '\n') { + gpr_log(GPR_ERROR, "Invalid character %c", c); + goto fail; + } + } else { + codes[num_codes++] = (unsigned char)code; + if (num_codes == 4) { + if (!decode_group(codes, num_codes, current, &result_size)) goto fail; + num_codes = 0; + } + } + } + + if (num_codes != 0 && + !decode_group(codes, num_codes, current, &result_size)) { + goto fail; + } + GPR_SLICE_SET_LENGTH(result, result_size); + return result; + +fail: + gpr_slice_unref(result); + return gpr_empty_slice(); +} diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h new file mode 100644 index 0000000000..6908095287 --- /dev/null +++ b/src/core/lib/security/util/b64.h @@ -0,0 +1,52 @@ +/* + * + * 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_B64_H +#define GRPC_CORE_LIB_SECURITY_UTIL_B64_H + +#include + +/* Encodes data using base64. It is the caller's responsability to free + the returned char * using gpr_free. Returns NULL on NULL input. */ +char *grpc_base64_encode(const void *data, size_t data_size, int url_safe, + int multiline); + +/* Decodes data according to the base64 specification. Returns an empty + slice in case of failure. */ +gpr_slice grpc_base64_decode(const char *b64, int url_safe); + +/* Same as above except that the length is provided by the caller. */ +gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, + int url_safe); + +#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 0000000000..9eda12c628 --- /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 0000000000..3046412729 --- /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 3fda2c9e1e..7ee7b51568 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 dab62530aa..0f0678a2cd 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 83058d9b2c..3ad8ce964a 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 246619bf68..44408b28af 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 550ff33140..fc56998cdb 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 69f7616074..eb28623264 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 cd031ca482..2a6d0d17af 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 1403b760f5..8f8c081465 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 b555bea740..5c6791f6f7 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 d1ead16235..e2f44ebe24 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 cea870321d..b26bd026fd 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 6d4707f3c7..3c36b767d3 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 7867293278..31e06372b9 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 bd314e90d8..2a102fb139 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 3aee52ee5c..405fe56c46 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 077f44d1d6..50bf25171c 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 20815d184c..80d21cc602 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 eff98270c8..0f4e8857b0 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 99bce4fbdf..10a5e5224e 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 aeaf38209b..6aba21a98c 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 1a4e64b30c..6106bec9d3 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 2274fe18d8..ecb873b655 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 80419efce4..b952503167 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 d22c164972..f42ca9f9cd 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 0e43d4e1e0..66225ff335 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 067361334d..b131452f73 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 0c9313f88f..0311864759 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 1b1453f7ea..260e68804e 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 f546f3b995..6c08a80882 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 4eec05a3b1..8b8212ebf0 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 17c88c4805..f5f91a9b40 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} -- cgit v1.2.3 From 5deda3db97828454da88cb2e1d463c9e0dff7263 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 5 May 2016 12:34:19 -0700 Subject: Temporary fix for plugin initialization problem --- src/core/ext/client_config/resolver_registry.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ext/client_config/resolver_registry.c b/src/core/ext/client_config/resolver_registry.c index 07f29bcb27..e7a4abd568 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) { -- cgit v1.2.3 From f2f707ca5503249e637542d7b3015c3fef2e3023 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 5 May 2016 13:04:20 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c index c0afc715bc..e4398abeb7 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 ecd6721a78..c8b2a4122f 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 dd29552b97..ae1f68a2b4 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); -- cgit v1.2.3 From ad0f7922540c7d1edabd3fbd03a8b98131953fc2 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 4 May 2016 19:49:31 -0700 Subject: Interop client that is resilient to server restarts --- .../ext/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(-) (limited to 'src/core') diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 9918fbdcb4..91fa917661 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 9af6a88044..7727824979 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 22293d211f..e5853b40f8 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 a3794fd93f..ae75762bb8 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 f287a5aa3b..31f5a424a0 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 cb0cd98821..c41ac6afc7 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 d9e3fd25c5..f0e9e3287e 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 -- cgit v1.2.3 From 16caa50aae7d1669550be35e205039f65cc4c363 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 6 May 2016 03:02:51 +0200 Subject: 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(-) (limited to 'src/core') diff --git a/Makefile b/Makefile index e77aa2dd16..a684ea8611 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 1a0888bdc3..13916830c1 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 97b1a5cb49..b77a59e351 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 5ed7f363d3..54a44ca551 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 716d6ed289..152d5d6190 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 fe954cbefb..aca76d2bb7 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 f7a9cb9c1c..e1609341d9 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 9a60be26b6..7520b0f81a 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 d98ed0b1fc..efdfa81124 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 873b4e2a91..0c13104d9d 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 67c6a5d5a1..01c8c5ac8f 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 12ad21b80e..dca7fd7e72 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 b8ae8e20b8..1267d0e45d 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 664ca03d97..2a319db979 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 5188ef1e8d..5fdfafbf3e 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 84b5c2a8ef..aabca410da 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 228c1d98d8..3ffc6174ed 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 -- cgit v1.2.3 From 303d3082a07363c29dc747e986658fd6c8dc4053 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 5 May 2016 18:25:34 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 5510c79b18..9769070cc1 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 cbe0b5a285..699719a523 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 809fd5f1fa..c7f941525d 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 9b2b94eedf..778557121d 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 22293d211f..314d6c8eae 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 e813473421..edbdf05e2a 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++' -- cgit v1.2.3 From 42342cbebb55ee168252accb0433b1bb6cc8e4a7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 9 May 2016 08:12:35 -0700 Subject: 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 -- .../cronet/client/secure/cronet_channel_create.c | 69 --- .../transport/cronet/transport/cronet_api_dummy.c | 85 --- .../transport/cronet/transport/cronet_transport.c | 640 --------------------- src/python/grpcio/grpc/_cython/imports.generated.c | 2 - src/python/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 - test/core/surface/public_headers_must_be_c89.c | 1 - third_party/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 (limited to 'src/core') diff --git a/BUILD b/BUILD index fae3596eec..1da1650438 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 a684ea8611..ffaf770144 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 12a745ffb0..4314ab7243 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 13916830c1..5e47c08455 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 5259e679ba..74f9ad242a 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 018306ca64..569f89bf7c 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 09a94a6cd0..61948ed1b8 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 ace28715dc..475fc990ad 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 295e0f55e8..0000000000 --- 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 152d5d6190..feb27175a9 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 df1acddcc0..0000000000 --- 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 687026c9fd..0000000000 --- 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 5bb085195c..0000000000 --- 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 09551472b5..f0a40dbb35 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 54c8aaad13..d5e810b7cf 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 5314329c2c..dab62530aa 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 cebbe8c40f..bc43f9d36b 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 d7ea6c574c..b67361ca25 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 fd6ff2c26f..3eeb55d033 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 15a511aebd..0000000000 --- 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 aabca410da..eed84252cc 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 3ffc6174ed..1fcc1fa140 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 8c67d2f844..3b3a49a5b2 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 7f0e5a8339..03f4eaa5be 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 6d1d69a913..4617e3de0d 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} - -- cgit v1.2.3 From 461233770f2aafe3188efefcfff7deecee3e441b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 9 May 2016 15:28:42 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 5510c79b18..e18bce7e56 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 cf5879d82e..0ce5d08837 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 9b2b94eedf..296a5f0d51 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 57c6897626..1c8b709015 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(); -- cgit v1.2.3 From 0b405d54d496acc331f1511353b26e9f9a0e4598 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 9 May 2016 15:58:22 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index 699719a523..cbe0b5a285 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 c7f941525d..c97079f638 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.", -- cgit v1.2.3 From 19cd009ec14c1a759fe4d0ef79eb3fab738137ca Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Tue, 10 May 2016 15:27:48 -0700 Subject: clang-format --- include/grpc++/impl/codegen/method_handler_impl.h | 14 ++++++++------ .../security/credentials/composite/composite_credentials.c | 1 - .../security/credentials/composite/composite_credentials.h | 1 - src/core/lib/security/credentials/credentials.c | 8 +++----- src/core/lib/security/credentials/fake/fake_credentials.c | 1 - src/core/lib/security/credentials/fake/fake_credentials.h | 1 - .../google_default/google_default_credentials.c | 2 +- .../google_default/google_default_credentials.h | 2 -- src/core/lib/security/credentials/iam/iam_credentials.c | 2 -- src/core/lib/security/credentials/iam/iam_credentials.h | 3 --- src/core/lib/security/credentials/jwt/json_token.c | 1 - src/core/lib/security/credentials/jwt/jwt_credentials.c | 1 - src/core/lib/security/credentials/jwt/jwt_credentials.h | 1 - .../lib/security/credentials/oauth2/oauth2_credentials.c | 2 -- .../lib/security/credentials/oauth2/oauth2_credentials.h | 2 -- .../lib/security/credentials/plugin/plugin_credentials.c | 2 -- .../lib/security/credentials/plugin/plugin_credentials.h | 3 --- src/core/lib/security/credentials/ssl/ssl_credentials.c | 4 ---- src/core/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 +- test/core/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(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index ad74efabc4..21ac6c4fb5 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 4a17f7c1b9..18189a8fb8 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 c83f74429f..3e360c177f 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 29cf9ee884..3dde6e587d 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 2a5d225078..54d7cf2581 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 10c2a0b5ce..e2403b5d80 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 da23bba62b..a521d95abc 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 33e8c2ec8d..838989f6f0 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 ec0f2841f2..89defa7c60 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 7110eaf478..06b4db8bef 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 fd3d0d6a64..354c13133e 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 9fd0527a52..8755a96af4 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 6faf676414..6fba3dfcfd 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 0984d1f53f..973c6e1d17 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 6cdcc68514..658cde89c1 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 b075e14551..bae357321e 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 cdabbbd30f..0b91d2f616 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 ee8d2e4365..545bca9d98 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 ea4bdabc04..f23dbdbe49 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 9eda12c628..7eed039baa 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 3046412729..5959626a5f 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 50bf25171c..7f4f4ffadf 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 10a5e5224e..1b7036cf9e 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 e72cef2811..c32160a7d4 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 a68f1ae7b6..1234542687 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), -- cgit v1.2.3 From 2b2f414dd1cb3d1f72c8f2713e381f1bb260b3f7 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Tue, 10 May 2016 15:29:42 -0700 Subject: Fixing headers. --- .../lib/security/credentials/composite/composite_credentials.h | 6 +++--- src/core/lib/security/credentials/fake/fake_credentials.h | 8 ++++---- .../credentials/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 +++--- src/core/lib/security/credentials/oauth2/oauth2_credentials.h | 6 +++--- src/core/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(-) (limited to 'src/core') diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index c83f74429f..96d3b14cc4 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 10c2a0b5ce..9cf38084a3 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 33e8c2ec8d..fa3f1ae1bf 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 7110eaf478..58b77723fd 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 6faf676414..acc73dd47f 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 6cdcc68514..4d28fce629 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 cdabbbd30f..5b28531152 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 3046412729..7f3d4659c3 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 41239e9c23..4338b83e32 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 / -- cgit v1.2.3 From 9d8612054749b9f5cd5c2e001c8a288870b27c11 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 May 2016 10:12:57 -0700 Subject: clang-format --- include/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(-) (limited to 'src/core') diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index ad74efabc4..21ac6c4fb5 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 69489f4b53..0240ea0a01 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 83058d9b2c..5b7f222f7a 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 e72cef2811..c32160a7d4 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 a68f1ae7b6..1234542687 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), -- cgit v1.2.3 From 4c2218e22930a4f17eaec4677470586e2d91e228 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 May 2016 10:27:08 -0700 Subject: Force wakeup after fd addition --- src/core/lib/iomgr/ev_poll_posix.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 0240ea0a01..99874d49eb 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); } -- cgit v1.2.3 From 56aa02383fd3f04750b8c442979863c25d5c23f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 May 2016 12:37:04 -0700 Subject: 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(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 2146c7dd1f..e451479073 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 976cc40347..9d47a262f8 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, -- cgit v1.2.3 From c2ec95bad4e279c713555195a7fd3ff6bbcc249e Mon Sep 17 00:00:00 2001 From: makdharma Date: Wed, 11 May 2016 16:26:15 -0700 Subject: Revert "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 ++ .../cronet/client/secure/cronet_channel_create.c | 69 +++ .../transport/cronet/transport/cronet_api_dummy.c | 85 +++ .../transport/cronet/transport/cronet_transport.c | 640 +++++++++++++++++++++ src/python/grpcio/grpc/_cython/imports.generated.c | 2 + src/python/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 + test/core/surface/public_headers_must_be_c89.c | 1 + third_party/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, 1721 insertions(+), 1 deletion(-) create mode 100644 include/grpc/grpc_cronet.h create mode 100644 src/core/ext/transport/cronet/client/secure/cronet_channel_create.c create mode 100644 src/core/ext/transport/cronet/transport/cronet_api_dummy.c create mode 100644 src/core/ext/transport/cronet/transport/cronet_transport.c create mode 100644 third_party/objective_c/Cronet/cronet_c_for_grpc.h (limited to 'src/core') diff --git a/BUILD b/BUILD index ad6903d684..1f6fc08cba 100644 --- a/BUILD +++ b/BUILD @@ -285,6 +285,42 @@ 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/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", @@ -439,6 +475,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/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -483,6 +522,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", @@ -1460,6 +1500,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/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -1504,6 +1547,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", @@ -1631,6 +1675,42 @@ 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/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", diff --git a/Makefile b/Makefile index 1ff2cb67c5..b8925cee47 100644 --- a/Makefile +++ b/Makefile @@ -2634,6 +2634,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/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -2681,6 +2684,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 \ @@ -14348,6 +14352,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 8bc2aee3d1..0d69fc5826 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/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/build.yaml b/build.yaml index b2cbd4d890..aeb31003e7 100644 --- a/build.yaml +++ b/build.yaml @@ -400,6 +400,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: @@ -547,6 +548,63 @@ 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 @@ -734,6 +792,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 c8d2aae106..58c3d82736 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/v1/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 393733209d..1a0ddc0d55 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -288,6 +288,42 @@ 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/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', @@ -326,6 +362,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', @@ -475,6 +512,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/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', @@ -631,6 +671,42 @@ 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/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', diff --git a/grpc.def b/grpc.def index 61948ed1b8..09a94a6cd0 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 240ea1ca1f..2d5045faba 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -169,6 +169,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 ) @@ -296,6 +297,42 @@ 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/v1/load_balancer.pb.h ) s.files += %w( third_party/nanopb/pb.h ) @@ -454,6 +491,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/v1/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 new file mode 100644 index 0000000000..295e0f55e8 --- /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/package.xml b/package.xml index 4c159e6024..cf11ea8f07 100644 --- a/package.xml +++ b/package.xml @@ -176,6 +176,7 @@ + @@ -303,6 +304,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -461,6 +498,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 new file mode 100644 index 0000000000..df1acddcc0 --- /dev/null +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c @@ -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. + * + */ + +#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 new file mode 100644 index 0000000000..687026c9fd --- /dev/null +++ b/src/core/ext/transport/cronet/transport/cronet_api_dummy.c @@ -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. + * + */ + +/* 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 new file mode 100644 index 0000000000..5bb085195c --- /dev/null +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -0,0 +1,640 @@ +/* + * + * 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 f0a40dbb35..09551472b5 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 d5e810b7cf..54c8aaad13 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 4b98dc1a13..c6af69360d 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/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 bc43f9d36b..cebbe8c40f 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 b67361ca25..d7ea6c574c 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 3eeb55d033..fd6ff2c26f 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/third_party/objective_c/Cronet/cronet_c_for_grpc.h b/third_party/objective_c/Cronet/cronet_c_for_grpc.h new file mode 100644 index 0000000000..15a511aebd --- /dev/null +++ b/third_party/objective_c/Cronet/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/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index eed84252cc..aabca410da 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -786,6 +786,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 7e0d5ebd37..ac919def65 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -786,6 +786,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 \ @@ -913,6 +914,42 @@ 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/v1/load_balancer.pb.h \ third_party/nanopb/pb.h \ @@ -1071,6 +1108,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/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 8b1aa574e8..64358400fc 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4157,7 +4157,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", @@ -6031,6 +6032,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", @@ -6046,6 +6048,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", @@ -6281,6 +6284,121 @@ "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 6a2843e37c..932c2699f4 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -293,6 +293,7 @@ + @@ -422,6 +423,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -728,6 +765,12 @@ + + + + + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 7d53be719c..2dc192ed50 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 @@ -576,6 +585,9 @@ include\grpc\impl\codegen + + include\grpc + include\grpc @@ -959,6 +971,114 @@ 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 @@ -1010,6 +1130,9 @@ {def748f5-ed2a-a9bb-40d9-c31d00f0e13b} + + {31de82ea-dc6c-73fb-a640-979b8a7b240c} + {d538af37-07b2-062b-fa2a-d9f882cb2737} @@ -1091,6 +1214,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} @@ -1115,6 +1250,9 @@ {c4661d64-349f-01c1-1ba8-0602f9047595} + + {27f30339-d694-40f5-db07-4b89b9aeea73} + {a21971fb-304f-da08-b1b2-7bd8df8ac373} @@ -1133,6 +1271,12 @@ {93d6596d-330c-1d27-6f84-3c840e57869e} + + {3a56a516-857e-d2aa-95cc-11685baf4e8c} + + + {a165c6e3-0776-6f40-7351-d7865668e220} + -- cgit v1.2.3 From 8fd90740bf190c5b156ef52aaabb75eead248fef Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Wed, 11 May 2016 16:58:31 -0700 Subject: Add curlies for multiline if statements. --- src/core/lib/http/parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c index a7efb5e73e..09b2ed40d1 100644 --- a/src/core/lib/http/parser.c +++ b/src/core/lib/http/parser.c @@ -161,8 +161,9 @@ static int add_header(grpc_http_parser *parser) { cur++; } if (cur == end) { - if (grpc_http1_trace) + if (grpc_http1_trace) { gpr_log(GPR_ERROR, "Didn't find ':' in header string"); + } goto error; } GPR_ASSERT(cur >= beg); -- cgit v1.2.3 From 11b55dfd429787deb38f3ef91e904369571cbada Mon Sep 17 00:00:00 2001 From: goldenbull Date: Thu, 12 May 2016 14:30:14 +0800 Subject: use LANG_ENGLISH for windows api FormatMessage --- src/core/lib/support/string_util_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/support/string_util_win32.c b/src/core/lib/support/string_util_win32.c index f3cb0c050f..0d7bcdb5aa 100644 --- a/src/core/lib/support/string_util_win32.c +++ b/src/core/lib/support/string_util_win32.c @@ -83,7 +83,7 @@ char *gpr_format_message(int messageid) { DWORD status = FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, (DWORD)messageid, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + NULL, (DWORD)messageid, MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), (LPTSTR)(&tmessage), 0, NULL); if (status == 0) return gpr_strdup("Unable to retrieve error string"); message = gpr_tchar_to_char(tmessage); -- cgit v1.2.3 From d310451ff1190e5c31287ee427938af1075de0ea Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 12 May 2016 08:53:22 -0700 Subject: Remove redundant declaration --- src/core/lib/iomgr/ev_poll_posix.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 99874d49eb..d1752327a2 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -195,16 +195,6 @@ struct grpc_pollset { 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); -- cgit v1.2.3 From 9aa6f40dff12a39e2d9d9f4d07c0c9a3eb87c22f Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Thu, 12 May 2016 13:28:04 -0400 Subject: Add callback when gRPC FD is about to be orphaned. --- src/core/lib/iomgr/udp_server.c | 18 ++++++++++++++---- src/core/lib/iomgr/udp_server.h | 6 +++++- test/core/iomgr/udp_server_test.c | 26 ++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index df6cf956d9..98ffccd59b 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -81,6 +81,7 @@ typedef struct { grpc_closure read_closure; grpc_closure destroyed_closure; grpc_udp_server_read_cb read_cb; + grpc_udp_server_orphan_cb orphan_cb; } server_port; /* the overall server */ @@ -168,6 +169,10 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { server_port *sp = &s->ports[i]; sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; + + GPR_ASSERT(sp->orphan_cb); + sp->orphan_cb(sp->emfd); + grpc_fd_orphan(exec_ctx, sp->emfd, &sp->destroyed_closure, NULL, "udp_listener_shutdown"); } @@ -268,7 +273,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { static int add_socket_to_server(grpc_udp_server *s, int fd, const struct sockaddr *addr, size_t addr_len, - grpc_udp_server_read_cb read_cb) { + grpc_udp_server_read_cb read_cb, + grpc_udp_server_orphan_cb orphan_cb) { server_port *sp; int port; char *addr_str; @@ -292,6 +298,7 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, memcpy(sp->addr.untyped, addr, addr_len); sp->addr_len = addr_len; sp->read_cb = read_cb; + sp->orphan_cb = orphan_cb; GPR_ASSERT(sp->emfd); gpr_mu_unlock(&s->mu); gpr_free(name); @@ -301,7 +308,8 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, } int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, - size_t addr_len, grpc_udp_server_read_cb read_cb) { + size_t addr_len, grpc_udp_server_read_cb read_cb, + grpc_udp_server_orphan_cb orphan_cb) { int allocated_port1 = -1; int allocated_port2 = -1; unsigned i; @@ -348,7 +356,8 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, addr = (struct sockaddr *)&wild6; addr_len = sizeof(wild6); fd = grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, &dsmode); - allocated_port1 = add_socket_to_server(s, fd, addr, addr_len, read_cb); + allocated_port1 = + add_socket_to_server(s, fd, addr, addr_len, read_cb, orphan_cb); if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; } @@ -370,7 +379,8 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, addr = (struct sockaddr *)&addr4_copy; addr_len = sizeof(addr4_copy); } - allocated_port2 = add_socket_to_server(s, fd, addr, addr_len, read_cb); + allocated_port2 = + add_socket_to_server(s, fd, addr, addr_len, read_cb, orphan_cb); done: gpr_free(allocated_addr); diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index d8cf957a22..33c5ce11cd 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -48,6 +48,9 @@ typedef struct grpc_udp_server grpc_udp_server; typedef void (*grpc_udp_server_read_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, struct grpc_server *server); +/* Called when the grpc_fd is about to be orphaned (and the FD closed). */ +typedef void (*grpc_udp_server_orphan_cb)(grpc_fd *emfd); + /* Create a server, initially not bound to any ports */ grpc_udp_server *grpc_udp_server_create(void); @@ -69,7 +72,8 @@ int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); /* TODO(ctiller): deprecate this, and make grpc_udp_server_add_ports to handle all of the multiple socket port matching logic in one place */ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, - size_t addr_len, grpc_udp_server_read_cb read_cb); + size_t addr_len, grpc_udp_server_read_cb read_cb, + grpc_udp_server_orphan_cb orphan_cb); void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server, grpc_closure *on_done); diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index 5248b613d7..a29a68eb33 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -54,6 +54,7 @@ static grpc_pollset *g_pollset; static gpr_mu *g_mu; static int g_number_of_reads = 0; static int g_number_of_bytes_read = 0; +static int g_number_of_orphan_calls = 0; static void on_read(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, grpc_server *server) { @@ -71,6 +72,12 @@ static void on_read(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, gpr_mu_unlock(g_mu); } +static void on_fd_orphaned(grpc_fd *emfd) { + gpr_log(GPR_INFO, "gRPC FD about to be orphaned: %d", + grpc_fd_wrapped_fd(emfd)); + g_number_of_orphan_calls++; +} + static void test_no_op(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_udp_server *s = grpc_udp_server_create(); @@ -88,6 +95,7 @@ static void test_no_op_with_start(void) { } static void test_no_op_with_port(void) { + g_number_of_orphan_calls = 0; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; struct sockaddr_in addr; grpc_udp_server *s = grpc_udp_server_create(); @@ -96,13 +104,17 @@ static void test_no_op_with_port(void) { memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; GPR_ASSERT(grpc_udp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), - on_read)); + on_read, on_fd_orphaned)); grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); + + /* The server had a single FD, which should be orphaned. */ + GPR_ASSERT(g_number_of_orphan_calls == 1); } static void test_no_op_with_port_and_start(void) { + g_number_of_orphan_calls = 0; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; struct sockaddr_in addr; grpc_udp_server *s = grpc_udp_server_create(); @@ -111,12 +123,15 @@ static void test_no_op_with_port_and_start(void) { memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; GPR_ASSERT(grpc_udp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), - on_read)); + on_read, on_fd_orphaned)); grpc_udp_server_start(&exec_ctx, s, NULL, 0, NULL); grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); + + /* The server had a single FD which should be orphaned. */ + GPR_ASSERT(g_number_of_orphan_calls == 1); } static void test_receive(int number_of_clients) { @@ -133,11 +148,12 @@ static void test_receive(int number_of_clients) { gpr_log(GPR_INFO, "clients=%d", number_of_clients); g_number_of_bytes_read = 0; + g_number_of_orphan_calls = 0; memset(&addr, 0, sizeof(addr)); addr.ss_family = AF_INET; - GPR_ASSERT( - grpc_udp_server_add_port(s, (struct sockaddr *)&addr, addr_len, on_read)); + GPR_ASSERT(grpc_udp_server_add_port(s, (struct sockaddr *)&addr, addr_len, + on_read, on_fd_orphaned)); svrfd = grpc_udp_server_get_fd(s, 0); GPR_ASSERT(svrfd >= 0); @@ -176,6 +192,8 @@ static void test_receive(int number_of_clients) { grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); + + GPR_ASSERT(g_number_of_orphan_calls == 5); } static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { -- cgit v1.2.3 From 183ba02ce7909b8c5bf1c3019f9da0123ddae720 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 12 May 2016 17:08:19 -0700 Subject: Renamed some defines --- include/grpc/impl/codegen/compression_types.h | 14 ++++++++------ src/core/lib/channel/channel_args.c | 9 +++++---- src/cpp/common/channel_arguments.cc | 2 +- src/cpp/server/server_builder.cc | 2 +- test/core/channel/channel_args_test.c | 3 ++- 5 files changed, 17 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/include/grpc/impl/codegen/compression_types.h b/include/grpc/impl/codegen/compression_types.h index 683ed3a488..1d500c971c 100644 --- a/include/grpc/impl/codegen/compression_types.h +++ b/include/grpc/impl/codegen/compression_types.h @@ -41,9 +41,10 @@ extern "C" { #endif /** To be used in channel arguments */ -#define GRPC_COMPRESSION_ALGORITHM_ARG "grpc.compression_algorithm" -#define GRPC_COMPRESSION_LEVEL_ARG "grpc.compression_level" -#define GRPC_COMPRESSION_ALGORITHM_STATE_ARG "grpc.compression_algorithm_state" +#define GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM "grpc.compression_algorithm" +#define GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL "grpc.compression_level" +#define GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET \ + "grpc.compression_algorithm_state" /* The various compression algorithms supported by gRPC */ typedef enum { @@ -68,17 +69,18 @@ typedef enum { typedef struct grpc_compression_options { /** All algs are enabled by default. This option corresponds to the channel - * argument key behind \a GRPC_COMPRESSION_ALGORITHM_STATE_ARG */ + * argument key behind \a GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET + */ uint32_t enabled_algorithms_bitset; /** The default channel compression algorithm. It'll be used in the absence of * call specific settings. This option corresponds to the channel argument key - * behind \a GRPC_COMPRESSION_ALGORITHM_ARG */ + * behind \a GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM */ grpc_compression_algorithm default_compression_algorithm; /** The default channel compression level. It'll be used in the absence of * call specific settings. This option corresponds to the channel argument key - * behind \a GRPC_COMPRESSION_ALGORITHM_ARG */ + * behind \a GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL */ grpc_compression_algorithm default_compression_level; } grpc_compression_options; diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 28d2d78d00..893cf0700e 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -170,7 +170,7 @@ grpc_compression_algorithm grpc_channel_args_get_compression_algorithm( if (a == NULL) return 0; for (i = 0; i < a->num_args; ++i) { if (a->args[i].type == GRPC_ARG_INTEGER && - !strcmp(GRPC_COMPRESSION_ALGORITHM_ARG, a->args[i].key)) { + !strcmp(GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM, a->args[i].key)) { return (grpc_compression_algorithm)a->args[i].value.integer; break; } @@ -182,7 +182,7 @@ grpc_channel_args *grpc_channel_args_set_compression_algorithm( grpc_channel_args *a, grpc_compression_algorithm algorithm) { grpc_arg tmp; tmp.type = GRPC_ARG_INTEGER; - tmp.key = GRPC_COMPRESSION_ALGORITHM_ARG; + tmp.key = GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM; tmp.value.integer = algorithm; return grpc_channel_args_copy_and_add(a, &tmp, 1); } @@ -196,7 +196,8 @@ static int find_compression_algorithm_states_bitset(const grpc_channel_args *a, size_t i; for (i = 0; i < a->num_args; ++i) { if (a->args[i].type == GRPC_ARG_INTEGER && - !strcmp(GRPC_COMPRESSION_ALGORITHM_STATE_ARG, a->args[i].key)) { + !strcmp(GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET, + a->args[i].key)) { *states_arg = &a->args[i].value.integer; return 1; /* GPR_TRUE */ } @@ -222,7 +223,7 @@ grpc_channel_args *grpc_channel_args_compression_algorithm_set_state( /* create a new arg */ grpc_arg tmp; tmp.type = GRPC_ARG_INTEGER; - tmp.key = GRPC_COMPRESSION_ALGORITHM_STATE_ARG; + tmp.key = GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET; /* all enabled by default */ tmp.value.integer = (1u << GRPC_COMPRESS_ALGORITHMS_COUNT) - 1; if (state != 0) { diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index db3558f192..f297ae8587 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -85,7 +85,7 @@ void ChannelArguments::Swap(ChannelArguments& other) { void ChannelArguments::SetCompressionAlgorithm( grpc_compression_algorithm algorithm) { - SetInt(GRPC_COMPRESSION_ALGORITHM_ARG, algorithm); + SetInt(GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM, algorithm); } // Note: a second call to this will add in front the result of the first call. diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 9658a56745..61f0f6ae2a 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -123,7 +123,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { if (max_message_size_ > 0) { args.SetInt(GRPC_ARG_MAX_MESSAGE_LENGTH, max_message_size_); } - args.SetInt(GRPC_COMPRESSION_ALGORITHM_STATE_ARG, + args.SetInt(GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET, compression_options_.enabled_algorithms_bitset); std::unique_ptr server( new Server(thread_pool.release(), true, max_message_size_, &args)); diff --git a/test/core/channel/channel_args_test.c b/test/core/channel/channel_args_test.c index c7fc25960c..c2fc05095a 100644 --- a/test/core/channel/channel_args_test.c +++ b/test/core/channel/channel_args_test.c @@ -77,7 +77,8 @@ static void test_set_compression_algorithm(void) { ch_args = grpc_channel_args_set_compression_algorithm(NULL, GRPC_COMPRESS_GZIP); GPR_ASSERT(ch_args->num_args == 1); - GPR_ASSERT(strcmp(ch_args->args[0].key, GRPC_COMPRESSION_ALGORITHM_ARG) == 0); + GPR_ASSERT(strcmp(ch_args->args[0].key, + GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM) == 0); GPR_ASSERT(ch_args->args[0].type == GRPC_ARG_INTEGER); grpc_channel_args_destroy(ch_args); -- cgit v1.2.3 From b1d3b36e3d93d4b3d06d81ecc0ea9a156c70450a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 14 May 2016 13:20:21 -0700 Subject: Add affinity to ev_poll_posix --- src/core/lib/iomgr/ev_poll_posix.c | 39 ++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index d1752327a2..ba62d36507 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -113,6 +113,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. @@ -134,7 +137,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); @@ -301,6 +305,7 @@ static grpc_fd *fd_create(int fd, const char *name) { r->on_done_closure = NULL; r->closed = 0; r->released = 0; + r->read_notifier_pollset = NULL; char *name2; gpr_asprintf(&name2, "%s fd=%d", name, fd); @@ -316,6 +321,18 @@ static bool fd_is_orphaned(grpc_fd *fd) { return (gpr_atm_acq_load(&fd->refst) & 1) == 0; } +/* 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 void pollset_kick_locked(grpc_fd_watcher *watcher) { gpr_mu_lock(&watcher->pollset->mu); GPR_ASSERT(watcher->worker); @@ -444,6 +461,11 @@ 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) { + 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); @@ -519,7 +541,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; @@ -555,6 +578,9 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, 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) { if (set_ready_locked(exec_ctx, fd, &fd->write_closure)) { @@ -899,11 +925,11 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, 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) { @@ -914,10 +940,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); + fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); } else { fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, - pfds[i].revents & POLLOUT_CHECK); + pfds[i].revents & POLLOUT_CHECK, pollset); } } } @@ -1181,6 +1207,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, -- cgit v1.2.3 From 556e5ae525c4fbcffaebc7f0f60b3f0192e3003a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 16 May 2016 11:00:33 -0700 Subject: Fix accelerated wakeups We can end up in situations where a pollset needs to kick itself. This is supposed to be an accelerated codepath, however a bug crept in whereby we missed the opportunity to do so, resulting in needing to round trip these wakeups redundantly through the OS and wake other threads unnecessarily. --- src/core/lib/iomgr/ev_poll_posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index d1752327a2..e91ae40212 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -824,6 +824,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, re-evaluate our pollers (this allows poll() based pollers to ensure they don't miss wakeups) */ keep_polling = 1; + gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset); while (keep_polling) { keep_polling = 0; if (!pollset->kicked_without_pollers) { @@ -832,7 +833,6 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, 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); #define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) #define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) @@ -926,7 +926,6 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_free(watchers); 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; @@ -958,6 +957,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, now = gpr_now(now.clock_type); } } + gpr_tls_set(&g_current_thread_poller, 0); if (added_worker) { remove_worker(pollset, &worker); gpr_tls_set(&g_current_thread_worker, 0); -- cgit v1.2.3 From 418a82187ca4905dbbcdd05c3271022a74bda6e6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 16 May 2016 16:27:51 -0700 Subject: Begin sharding request queues per cq --- .../chttp2/server/insecure/server_chttp2.c | 11 ++--- src/core/lib/iomgr/tcp_server.h | 1 + src/core/lib/iomgr/tcp_server_posix.c | 2 +- src/core/lib/surface/server.c | 49 +++++++++++++--------- src/core/lib/surface/server.h | 1 + third_party/protobuf | 2 +- 6 files changed, 37 insertions(+), 29 deletions(-) (limited to 'src/core') 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 e21fa2a072..0428bb1e3d 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -43,14 +43,8 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -static void setup_transport(grpc_exec_ctx *exec_ctx, void *server, - grpc_transport *transport) { - grpc_server_setup_transport(exec_ctx, server, transport, - grpc_server_get_channel_args(server)); -} - static void new_transport(grpc_exec_ctx *exec_ctx, void *server, - grpc_endpoint *tcp, + grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { /* * Beware that the call to grpc_create_chttp2_transport() has to happen before @@ -61,7 +55,8 @@ static void new_transport(grpc_exec_ctx *exec_ctx, void *server, */ grpc_transport *transport = grpc_create_chttp2_transport( exec_ctx, grpc_server_get_channel_args(server), tcp, 0); - setup_transport(exec_ctx, server, transport); + grpc_server_setup_transport(exec_ctx, server, transport, accepting_pollset, + grpc_server_get_channel_args(server)); grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL, 0); } diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 99b9f29729..fee14ae661 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -52,6 +52,7 @@ typedef struct grpc_tcp_server_acceptor { /* Called for newly connected TCP connections. */ typedef void (*grpc_tcp_server_cb)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *ep, + grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor); /* Create a server, initially not bound to any ports. The caller owns one ref. diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 97c945b834..c695621de8 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -362,7 +362,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { 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), - &acceptor); + read_notifier_pollset, &acceptor); gpr_free(name); gpr_free(addr_str); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index c9b458faf2..f1a031b715 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -108,6 +108,7 @@ struct channel_data { grpc_server *server; grpc_connectivity_state connectivity_state; grpc_channel *channel; + size_t cq_idx; /* linked list of all channels on a server */ channel_data *next; channel_data *prev; @@ -180,7 +181,8 @@ struct registered_method { char *host; grpc_server_register_method_payload_handling payload_handling; uint32_t flags; - request_matcher request_matcher; + /* one request matcher per method per cq */ + request_matcher *request_matchers; registered_method *next; }; @@ -207,7 +209,8 @@ struct grpc_server { gpr_mu mu_call; /* mutex for call-specific state */ registered_method *registered_methods; - request_matcher unregistered_request_matcher; + /** one request matcher for unregistered methods per cq */ + request_matcher *unregistered_request_matchers; /** free list of available requested_calls indices */ gpr_stack_lockfree *request_freelist; /** requested call backing data */ @@ -364,15 +367,17 @@ static void server_delete(grpc_exec_ctx *exec_ctx, grpc_server *server) { gpr_mu_destroy(&server->mu_call); while ((rm = server->registered_methods) != NULL) { server->registered_methods = rm->next; - request_matcher_destroy(&rm->request_matcher); + for (i = 0; i < server->cq_count; i++) { + request_matcher_destroy(&rm->request_matchers[i]); + } gpr_free(rm->method); gpr_free(rm->host); gpr_free(rm); } for (i = 0; i < server->cq_count; i++) { GRPC_CQ_INTERNAL_UNREF(server->cqs[i], "server"); + request_matcher_destroy(&server->unregistered_request_matchers[i]); } - request_matcher_destroy(&server->unregistered_request_matcher); gpr_stack_lockfree_destroy(server->request_freelist); gpr_free(server->cqs); gpr_free(server->pollsets); @@ -584,9 +589,10 @@ static void start_new_rpc(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { if ((rm->flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) && !calld->recv_idempotent_request) continue; - finish_start_new_rpc(exec_ctx, server, elem, - &rm->server_registered_method->request_matcher, - rm->server_registered_method->payload_handling); + finish_start_new_rpc( + exec_ctx, server, elem, + &rm->server_registered_method->request_matchers[chand->cq_idx], + rm->server_registered_method->payload_handling); return; } /* check for a wildcard method definition (no host set) */ @@ -600,14 +606,15 @@ static void start_new_rpc(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { if ((rm->flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) && !calld->recv_idempotent_request) continue; - finish_start_new_rpc(exec_ctx, server, elem, - &rm->server_registered_method->request_matcher, - rm->server_registered_method->payload_handling); + finish_start_new_rpc( + exec_ctx, server, elem, + &rm->server_registered_method->request_matchers[chand->cq_idx], + rm->server_registered_method->payload_handling); return; } } finish_start_new_rpc(exec_ctx, server, elem, - &server->unregistered_request_matcher, + &server->unregistered_request_matchers[chand->cq_idx], GRPC_SRM_PAYLOAD_NONE); } @@ -637,14 +644,17 @@ static int num_channels(grpc_server *server) { static void kill_pending_work_locked(grpc_exec_ctx *exec_ctx, grpc_server *server) { - registered_method *rm; - request_matcher_kill_requests(exec_ctx, server, - &server->unregistered_request_matcher); - 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_zombify_all_pending_calls(exec_ctx, &rm->request_matcher); + for (size_t i = 0; i < server->cq_count; i++) { + request_matcher_kill_requests(exec_ctx, server, + &server->unregistered_request_matchers[i]); + request_matcher_zombify_all_pending_calls( + exec_ctx, &server->unregistered_request_matchers[i]); + for (registered_method *rm = server->registered_methods; rm; + rm = rm->next) { + request_matcher_kill_requests(exec_ctx, server, &rm->request_matchers[i]); + request_matcher_zombify_all_pending_calls(exec_ctx, + &rm->request_matchers[i]); + } } } @@ -1039,6 +1049,7 @@ void grpc_server_start(grpc_server *server) { void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, grpc_transport *transport, + grpc_pollset *accepting_pollset, const grpc_channel_args *args) { size_t num_registered_methods; size_t alloc; diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h index 470ef23c69..fb6e4d60c5 100644 --- a/src/core/lib/surface/server.h +++ b/src/core/lib/surface/server.h @@ -53,6 +53,7 @@ void grpc_server_add_listener( server */ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *server, grpc_transport *transport, + grpc_pollset *accepting_pollset, const grpc_channel_args *args); const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server); diff --git a/third_party/protobuf b/third_party/protobuf index a1938b2aa9..d5fb408ddc 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 +Subproject commit d5fb408ddc281ffcadeb08699e65bb694656d0bd -- cgit v1.2.3 From 9f9d4223fbb0cc93b95c5c1bd379c8b848936b7d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 16 May 2016 17:02:14 -0700 Subject: Further server cq affinity work --- .../chttp2/server/secure/server_secure_chttp2.c | 74 ++++++++++--------- src/core/lib/surface/completion_queue.h | 1 + src/core/lib/surface/server.c | 86 +++++++++++++++------- 3 files changed, 99 insertions(+), 62 deletions(-) (limited to 'src/core') 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 698b2bef61..26b0f00e9e 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 @@ -52,7 +52,7 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -typedef struct grpc_server_secure_state { +typedef struct server_secure_state { grpc_server *server; grpc_tcp_server *tcp; grpc_server_security_connector *sc; @@ -62,13 +62,16 @@ typedef struct grpc_server_secure_state { gpr_refcount refcount; grpc_closure destroy_closure; grpc_closure *destroy_callback; -} grpc_server_secure_state; +} server_secure_state; -static void state_ref(grpc_server_secure_state *state) { - gpr_ref(&state->refcount); -} +typedef struct server_secure_connect { + server_secure_state *state; + grpc_pollset *accepting_pollset; +} server_secure_connect; + +static void state_ref(server_secure_state *state) { gpr_ref(&state->refcount); } -static void state_unref(grpc_server_secure_state *state) { +static void state_unref(server_secure_state *state) { if (gpr_unref(&state->refcount)) { /* ensure all threads have unlocked */ gpr_mu_lock(&state->mu); @@ -80,67 +83,66 @@ static void state_unref(grpc_server_secure_state *state) { } } -static void setup_transport(grpc_exec_ctx *exec_ctx, void *statep, - grpc_transport *transport, - grpc_auth_context *auth_context) { - grpc_server_secure_state *state = statep; - grpc_channel_args *args_copy; - grpc_arg args_to_add[2]; - args_to_add[0] = grpc_server_credentials_to_arg(state->creds); - args_to_add[1] = grpc_auth_context_to_arg(auth_context); - args_copy = grpc_channel_args_copy_and_add( - grpc_server_get_channel_args(state->server), args_to_add, - GPR_ARRAY_SIZE(args_to_add)); - grpc_server_setup_transport(exec_ctx, state->server, transport, args_copy); - grpc_channel_args_destroy(args_copy); -} - static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, grpc_security_status status, grpc_endpoint *secure_endpoint, grpc_auth_context *auth_context) { - grpc_server_secure_state *state = statep; + server_secure_connect *state = statep; grpc_transport *transport; if (status == GRPC_SECURITY_OK) { if (secure_endpoint) { - gpr_mu_lock(&state->mu); - if (!state->is_shutdown) { + gpr_mu_lock(&state->state->mu); + if (!state->state->is_shutdown) { transport = grpc_create_chttp2_transport( - exec_ctx, grpc_server_get_channel_args(state->server), + exec_ctx, grpc_server_get_channel_args(state->state->server), secure_endpoint, 0); - setup_transport(exec_ctx, state, transport, auth_context); + grpc_channel_args *args_copy; + grpc_arg args_to_add[2]; + args_to_add[0] = grpc_server_credentials_to_arg(state->state->creds); + args_to_add[1] = grpc_auth_context_to_arg(auth_context); + args_copy = grpc_channel_args_copy_and_add( + grpc_server_get_channel_args(state->state->server), args_to_add, + GPR_ARRAY_SIZE(args_to_add)); + grpc_server_setup_transport(exec_ctx, state->state->server, transport, + state->accepting_pollset, args_copy); + grpc_channel_args_destroy(args_copy); grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL, 0); } else { /* We need to consume this here, because the server may already have * gone away. */ grpc_endpoint_destroy(exec_ctx, secure_endpoint); } - gpr_mu_unlock(&state->mu); + gpr_mu_unlock(&state->state->mu); } } else { gpr_log(GPR_ERROR, "Secure transport failed with error %d", status); } - state_unref(state); + state_unref(state->state); + gpr_free(state); } static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, + grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { - grpc_server_secure_state *state = statep; - state_ref(state); - grpc_server_security_connector_do_handshake( - exec_ctx, state->sc, acceptor, tcp, on_secure_handshake_done, state); + server_secure_connect *state = gpr_malloc(sizeof(*state)); + 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); } /* Server callback: start listening on our ports */ static void start(grpc_exec_ctx *exec_ctx, grpc_server *server, void *statep, grpc_pollset **pollsets, size_t pollset_count) { - grpc_server_secure_state *state = statep; + server_secure_state *state = statep; grpc_tcp_server_start(exec_ctx, state->tcp, pollsets, pollset_count, on_accept, state); } static void destroy_done(grpc_exec_ctx *exec_ctx, void *statep, bool success) { - grpc_server_secure_state *state = statep; + server_secure_state *state = statep; if (state->destroy_callback != NULL) { state->destroy_callback->cb(exec_ctx, state->destroy_callback->cb_arg, success); @@ -153,7 +155,7 @@ static void destroy_done(grpc_exec_ctx *exec_ctx, void *statep, bool success) { callbacks) */ static void destroy(grpc_exec_ctx *exec_ctx, grpc_server *server, void *statep, grpc_closure *callback) { - grpc_server_secure_state *state = statep; + server_secure_state *state = statep; grpc_tcp_server *tcp; gpr_mu_lock(&state->mu); state->is_shutdown = 1; @@ -167,7 +169,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds) { grpc_resolved_addresses *resolved = NULL; grpc_tcp_server *tcp = NULL; - grpc_server_secure_state *state = NULL; + server_secure_state *state = NULL; size_t i; unsigned count = 0; int port_num = -1; diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 1528ca4ad8..3d0dd13c53 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -81,6 +81,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, void *done_arg, grpc_cq_completion *storage); grpc_pollset *grpc_cq_pollset(grpc_completion_queue *cc); +grpc_completion_queue *grpc_cq_from_pollset(grpc_pollset *ps); void grpc_cq_mark_non_listening_server_cq(grpc_completion_queue *cc); bool grpc_cq_is_non_listening_server_cq(grpc_completion_queue *cc); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index f1a031b715..d1fb3fc383 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -81,7 +81,6 @@ typedef struct requested_call { void *tag; grpc_server *server; grpc_completion_queue *cq_bound_to_call; - grpc_completion_queue *cq_for_notification; grpc_call **call; grpc_cq_completion completion; grpc_metadata_array *initial_metadata; @@ -171,6 +170,7 @@ struct call_data { struct request_matcher { grpc_server *server; + size_t cq_idx; call_data *pending_head; call_data *pending_tail; gpr_stack_lockfree *requests; @@ -237,7 +237,7 @@ struct grpc_server { static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *calld, bool success); static void fail_call(grpc_exec_ctx *exec_ctx, grpc_server *server, - requested_call *rc); + size_t cq_idx, requested_call *rc); /* 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); @@ -312,9 +312,10 @@ static void channel_broadcaster_shutdown(grpc_exec_ctx *exec_ctx, */ static void request_matcher_init(request_matcher *rm, size_t entries, - grpc_server *server) { + size_t cq_idx, grpc_server *server) { memset(rm, 0, sizeof(*rm)); rm->server = server; + rm->cq_idx = cq_idx; rm->requests = gpr_stack_lockfree_create(entries); } @@ -347,7 +348,8 @@ static void request_matcher_kill_requests(grpc_exec_ctx *exec_ctx, request_matcher *rm) { 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, rm->cq_idx, + &server->requested_calls[request_id]); } } @@ -458,11 +460,11 @@ static void done_request_event(grpc_exec_ctx *exec_ctx, void *req, } static void publish_call(grpc_exec_ctx *exec_ctx, grpc_server *server, - call_data *calld, requested_call *rc) { + call_data *calld, size_t cq_idx, requested_call *rc) { grpc_call_set_completion_queue(exec_ctx, calld->call, rc->cq_bound_to_call); grpc_call *call = calld->call; *rc->call = call; - calld->cq_new = rc->cq_for_notification; + calld->cq_new = server->cqs[cq_idx]; GPR_SWAP(grpc_metadata_array, *rc->initial_metadata, calld->initial_metadata); switch (rc->type) { case BATCH_CALL: @@ -530,7 +532,8 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { gpr_mu_lock(&calld->mu_state); calld->state = ACTIVATED; gpr_mu_unlock(&calld->mu_state); - publish_call(exec_ctx, server, calld, &server->requested_calls[request_id]); + publish_call(exec_ctx, server, calld, rm->cq_idx, + &server->requested_calls[request_id]); } } @@ -972,8 +975,6 @@ grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) { for (i = 0; i < (size_t)server->max_requested_calls; i++) { gpr_stack_lockfree_push(server->request_freelist, (int)i); } - request_matcher_init(&server->unregistered_request_matcher, - server->max_requested_calls, server); server->requested_calls = gpr_malloc(server->max_requested_calls * sizeof(*server->requested_calls)); @@ -1017,8 +1018,6 @@ void *grpc_server_register_method( } m = gpr_malloc(sizeof(registered_method)); memset(m, 0, sizeof(*m)); - request_matcher_init(&m->request_matcher, server->max_requested_calls, - server); m->method = gpr_strdup(method); m->host = gpr_strdup(host); m->next = server->registered_methods; @@ -1036,8 +1035,21 @@ void grpc_server_start(grpc_server *server) { GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server)); server->pollsets = gpr_malloc(sizeof(grpc_pollset *) * server->cq_count); + server->unregistered_request_matchers = gpr_malloc( + sizeof(*server->unregistered_request_matchers) * server->cq_count); for (i = 0; i < server->cq_count; i++) { server->pollsets[i] = grpc_cq_pollset(server->cqs[i]); + request_matcher_init(&server->unregistered_request_matchers[i], + server->max_requested_calls, i, server); + for (registered_method *rm = server->registered_methods; rm; + rm = rm->next) { + if (i == 0) { + rm->request_matchers = + gpr_malloc(sizeof(*rm->request_matchers) * server->cq_count); + } + request_matcher_init(&rm->request_matchers[i], + server->max_requested_calls, i, server); + } } for (l = server->listeners; l; l = l->next) { @@ -1074,6 +1086,17 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, server_ref(s); chand->channel = channel; + size_t cq_idx; + grpc_completion_queue *accepting_cq = grpc_cq_from_pollset(accepting_pollset); + for (cq_idx = 0; cq_idx < s->cq_count; cq_idx++) { + if (s->cqs[cq_idx] == accepting_cq) break; + } + if (cq_idx == s->cq_count) { + /* completion queue not found: pick a random one to publish new calls to */ + cq_idx = (size_t)rand() % s->cq_count; + } + chand->cq_idx = cq_idx; + num_registered_methods = 0; for (rm = s->registered_methods; rm; rm = rm->next) { num_registered_methods++; @@ -1244,27 +1267,27 @@ void grpc_server_add_listener( } static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, - grpc_server *server, + grpc_server *server, size_t cq_idx, requested_call *rc) { call_data *calld = NULL; 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, cq_idx, rc); 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, cq_idx, rc); return GRPC_CALL_OK; } switch (rc->type) { case BATCH_CALL: - rm = &server->unregistered_request_matcher; + rm = &server->unregistered_request_matchers[cq_idx]; break; case REGISTERED_CALL: - rm = &rc->data.registered.registered_method->request_matcher; + rm = &rc->data.registered.registered_method->request_matchers[cq_idx]; break; } server->requested_calls[request_id] = *rc; @@ -1290,7 +1313,7 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, GPR_ASSERT(calld->state == PENDING); calld->state = ACTIVATED; gpr_mu_unlock(&calld->mu_state); - publish_call(exec_ctx, server, calld, + publish_call(exec_ctx, server, calld, cq_idx, &server->requested_calls[request_id]); } gpr_mu_lock(&server->mu_call); @@ -1314,7 +1337,13 @@ grpc_call_error grpc_server_request_call( "cq_bound_to_call=%p, cq_for_notification=%p, tag=%p)", 7, (server, call, details, initial_metadata, cq_bound_to_call, cq_for_notification, tag)); - if (!grpc_cq_is_server_cq(cq_for_notification)) { + size_t cq_idx; + for (cq_idx = 0; cq_idx < server->cq_count; cq_idx++) { + if (server->cqs[cq_idx] == cq_for_notification) { + break; + } + } + if (cq_idx == server->cq_count) { gpr_free(rc); error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; goto done; @@ -1325,11 +1354,10 @@ grpc_call_error grpc_server_request_call( rc->server = server; rc->tag = tag; rc->cq_bound_to_call = cq_bound_to_call; - rc->cq_for_notification = cq_for_notification; rc->call = call; rc->data.batch.details = details; rc->initial_metadata = initial_metadata; - error = queue_call_request(&exec_ctx, server, rc); + error = queue_call_request(&exec_ctx, server, cq_idx, rc); done: grpc_exec_ctx_finish(&exec_ctx); return error; @@ -1351,7 +1379,14 @@ grpc_call_error grpc_server_request_registered_call( "tag=%p)", 9, (server, rmp, call, deadline, initial_metadata, optional_payload, cq_bound_to_call, cq_for_notification, tag)); - if (!grpc_cq_is_server_cq(cq_for_notification)) { + + size_t cq_idx; + for (cq_idx = 0; cq_idx < server->cq_count; cq_idx++) { + if (server->cqs[cq_idx] == cq_for_notification) { + break; + } + } + if (cq_idx == server->cq_count) { gpr_free(rc); error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; goto done; @@ -1367,26 +1402,25 @@ grpc_call_error grpc_server_request_registered_call( rc->server = server; rc->tag = tag; rc->cq_bound_to_call = cq_bound_to_call; - rc->cq_for_notification = cq_for_notification; rc->call = call; rc->data.registered.registered_method = rm; rc->data.registered.deadline = deadline; rc->initial_metadata = initial_metadata; rc->data.registered.optional_payload = optional_payload; - error = queue_call_request(&exec_ctx, server, rc); + error = queue_call_request(&exec_ctx, server, cq_idx, rc); done: grpc_exec_ctx_finish(&exec_ctx); return error; } static void fail_call(grpc_exec_ctx *exec_ctx, grpc_server *server, - requested_call *rc) { + size_t cq_idx, requested_call *rc) { *rc->call = NULL; rc->initial_metadata->count = 0; server_ref(server); - grpc_cq_end_op(exec_ctx, rc->cq_for_notification, rc->tag, 0, - done_request_event, rc, &rc->completion); + grpc_cq_end_op(exec_ctx, server->cqs[cq_idx], rc->tag, 0, done_request_event, + rc, &rc->completion); } const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server) { -- cgit v1.2.3 From 40945c702ad828bd4d3fee67e17d737e11f896c9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 16 May 2016 17:15:24 -0700 Subject: Add missing function for completion queue --- src/core/lib/surface/completion_queue.c | 5 +++++ test/core/surface/completion_queue_test.c | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index ae78f8f616..5eb7cf1bf4 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -86,6 +86,7 @@ struct grpc_completion_queue { }; #define POLLSET_FROM_CQ(cq) ((grpc_pollset *)(cq + 1)) +#define CQ_FROM_POLLSET(ps) (((grpc_completion_queue *)ps) - 1) static gpr_mu g_freelist_mu; static grpc_completion_queue *g_freelist; @@ -514,6 +515,10 @@ grpc_pollset *grpc_cq_pollset(grpc_completion_queue *cc) { return POLLSET_FROM_CQ(cc); } +grpc_completion_queue *grpc_cq_from_pollset(grpc_pollset *ps) { + return CQ_FROM_POLLSET(ps); +} + void grpc_cq_mark_non_listening_server_cq(grpc_completion_queue *cc) { cc->is_non_listening_server_cq = 1; } diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index d62d5a93b1..be6115e012 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -63,6 +63,12 @@ static void test_no_op(void) { shutdown_and_destroy(grpc_completion_queue_create(NULL)); } +static void test_pollset_conversion() { + grpc_completion_queue *cq = grpc_completion_queue(NULL); + GPR_ASSERT(grpc_cq_from_pollset(grpc_cq_pollset(cq)) == cq); + shutdown_and_destroy(cq); +} + static void test_wait_empty(void) { grpc_completion_queue *cc; grpc_event event; -- cgit v1.2.3 From cf2cce661d719401f5cc0573ba861d78eae6ffcc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 17 May 2016 08:33:20 -0700 Subject: Bug fixes --- src/core/lib/surface/server.c | 2 ++ test/core/bad_client/bad_client.c | 2 +- test/core/client_config/set_initial_connect_string_test.c | 2 +- test/core/end2end/fixtures/h2_sockpair+trace.c | 2 +- test/core/end2end/fixtures/h2_sockpair.c | 2 +- test/core/end2end/fixtures/h2_sockpair_1byte.c | 2 +- test/core/end2end/fuzzers/api_fuzzer.c | 2 +- test/core/end2end/fuzzers/server_fuzzer.c | 2 +- test/core/iomgr/tcp_server_posix_test.c | 2 +- test/core/surface/completion_queue_test.c | 5 +++-- test/core/surface/concurrent_connectivity_test.c | 2 +- test/core/surface/server_test.c | 6 ++++-- test/core/util/reconnect_server.c | 2 +- 13 files changed, 19 insertions(+), 14 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index d1fb3fc383..5d2f3ee2f2 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -372,6 +372,7 @@ static void server_delete(grpc_exec_ctx *exec_ctx, grpc_server *server) { for (i = 0; i < server->cq_count; i++) { request_matcher_destroy(&rm->request_matchers[i]); } + gpr_free(rm->request_matchers); gpr_free(rm->method); gpr_free(rm->host); gpr_free(rm); @@ -381,6 +382,7 @@ static void server_delete(grpc_exec_ctx *exec_ctx, grpc_server *server) { request_matcher_destroy(&server->unregistered_request_matchers[i]); } gpr_stack_lockfree_destroy(server->request_freelist); + gpr_free(server->unregistered_request_matchers); gpr_free(server->cqs); gpr_free(server->pollsets); gpr_free(server->shutdown_tags); diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index e5820688ef..f753b6fd24 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -70,7 +70,7 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { static void server_setup_transport(void *ts, grpc_transport *transport) { thd_args *a = ts; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_server_setup_transport(&exec_ctx, a->server, transport, + grpc_server_setup_transport(&exec_ctx, a->server, transport, NULL, grpc_server_get_channel_args(a->server)); grpc_exec_ctx_finish(&exec_ctx); } 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 c1b8452866..f21d651d46 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -79,7 +79,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } } -static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, +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); diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index b730df753c..6b0769b608 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -63,7 +63,7 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { 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_setup_transport(&exec_ctx, f->server, transport, NULL, 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 41fcc1d631..7be88f8a68 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -62,7 +62,7 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { 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_setup_transport(&exec_ctx, f->server, transport, NULL, 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 16ffb6ec13..166654bcbf 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -62,7 +62,7 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { 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_setup_transport(&exec_ctx, f->server, transport, NULL, grpc_server_get_channel_args(f->server)); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index b133a948ee..a1d9e0d59b 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -252,7 +252,7 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, bool success) { grpc_transport *transport = grpc_create_chttp2_transport(exec_ctx, NULL, server, 0); - grpc_server_setup_transport(exec_ctx, g_server, transport, NULL); + grpc_server_setup_transport(exec_ctx, g_server, transport, NULL, NULL); grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL, 0); grpc_exec_ctx_enqueue(exec_ctx, fc->closure, false, NULL); diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index 40273711ab..0a7d6d92aa 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -69,7 +69,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_server_start(server); grpc_transport *transport = grpc_create_chttp2_transport(&exec_ctx, NULL, mock_endpoint, 0); - grpc_server_setup_transport(&exec_ctx, server, transport, NULL); + grpc_server_setup_transport(&exec_ctx, server, transport, NULL, NULL); grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); grpc_call *call1 = NULL; diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 266d2396af..365bfbbaa8 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -112,7 +112,7 @@ static void server_weak_ref_set(server_weak_ref *weak_ref, weak_ref->server = server; } -static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, +static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *pollset, grpc_tcp_server_acceptor *acceptor) { grpc_endpoint_shutdown(exec_ctx, tcp); grpc_endpoint_destroy(exec_ctx, tcp); diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index be6115e012..49a1fc441f 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -63,8 +63,8 @@ static void test_no_op(void) { shutdown_and_destroy(grpc_completion_queue_create(NULL)); } -static void test_pollset_conversion() { - grpc_completion_queue *cq = grpc_completion_queue(NULL); +static void test_pollset_conversion(void) { + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); GPR_ASSERT(grpc_cq_from_pollset(grpc_cq_pollset(cq)) == cq); shutdown_and_destroy(cq); } @@ -414,6 +414,7 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_no_op(); + test_pollset_conversion(); test_wait_empty(); test_shutdown_then_next_polling(); test_shutdown_then_next_with_timeout(); diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 28ddf58cc8..af23fba8f3 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -95,7 +95,7 @@ void server_thread(void *vargs) { GPR_ASSERT(detag(ev.tag) == 0xd1e); } -static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, +static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, grpc_pollset*accepting_pollset, grpc_tcp_server_acceptor *acceptor) { struct server_thread_args *args = (struct server_thread_args *)vargs; (void)acceptor; diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c index 3d2e25379a..1e94c5a41b 100644 --- a/test/core/surface/server_test.c +++ b/test/core/surface/server_test.c @@ -67,12 +67,14 @@ void test_register_method_fail(void) { void test_request_call_on_no_server_cq(void) { grpc_completion_queue *cc = grpc_completion_queue_create(NULL); + grpc_server *server = grpc_server_create(NULL, NULL); GPR_ASSERT(GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE == - grpc_server_request_call(NULL, NULL, NULL, NULL, cc, cc, NULL)); + grpc_server_request_call(server, NULL, NULL, NULL, cc, cc, NULL)); GPR_ASSERT(GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE == - grpc_server_request_registered_call(NULL, NULL, NULL, NULL, NULL, + grpc_server_request_registered_call(server, NULL, NULL, NULL, NULL, NULL, cc, cc, NULL)); grpc_completion_queue_destroy(cc); + grpc_server_destroy(server); } void test_bind_server_twice(void) { diff --git a/test/core/util/reconnect_server.c b/test/core/util/reconnect_server.c index d408374a09..d3d8f5a23b 100644 --- a/test/core/util/reconnect_server.c +++ b/test/core/util/reconnect_server.c @@ -70,7 +70,7 @@ static void pretty_print_backoffs(reconnect_server *server) { } } -static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, +static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { char *peer; char *last_colon; -- cgit v1.2.3 From 88ef00efbe0ec62110b405e02e4bbbec59f6435b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 17 May 2016 09:31:49 -0700 Subject: Remove broken test --- src/core/lib/surface/server.c | 37 +++++++----- test/core/iomgr/fd_posix_test.c | 130 ---------------------------------------- 2 files changed, 23 insertions(+), 144 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 5d2f3ee2f2..4d179d0ab1 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -197,6 +197,7 @@ struct grpc_server { grpc_completion_queue **cqs; grpc_pollset **pollsets; size_t cq_count; + bool started; /* The two following mutexes control access to server-state mu_global controls access to non-call-related state (e.g., channel state) @@ -369,17 +370,21 @@ static void server_delete(grpc_exec_ctx *exec_ctx, grpc_server *server) { gpr_mu_destroy(&server->mu_call); while ((rm = server->registered_methods) != NULL) { server->registered_methods = rm->next; - for (i = 0; i < server->cq_count; i++) { - request_matcher_destroy(&rm->request_matchers[i]); + if (server->started) { + for (i = 0; i < server->cq_count; i++) { + request_matcher_destroy(&rm->request_matchers[i]); + } + gpr_free(rm->request_matchers); } - gpr_free(rm->request_matchers); gpr_free(rm->method); gpr_free(rm->host); gpr_free(rm); } for (i = 0; i < server->cq_count; i++) { GRPC_CQ_INTERNAL_UNREF(server->cqs[i], "server"); - request_matcher_destroy(&server->unregistered_request_matchers[i]); + if (server->started) { + request_matcher_destroy(&server->unregistered_request_matchers[i]); + } } gpr_stack_lockfree_destroy(server->request_freelist); gpr_free(server->unregistered_request_matchers); @@ -649,16 +654,19 @@ static int num_channels(grpc_server *server) { static void kill_pending_work_locked(grpc_exec_ctx *exec_ctx, grpc_server *server) { - for (size_t i = 0; i < server->cq_count; i++) { - request_matcher_kill_requests(exec_ctx, server, - &server->unregistered_request_matchers[i]); - request_matcher_zombify_all_pending_calls( - exec_ctx, &server->unregistered_request_matchers[i]); - for (registered_method *rm = server->registered_methods; rm; - rm = rm->next) { - request_matcher_kill_requests(exec_ctx, server, &rm->request_matchers[i]); - request_matcher_zombify_all_pending_calls(exec_ctx, - &rm->request_matchers[i]); + if (server->started) { + for (size_t i = 0; i < server->cq_count; i++) { + request_matcher_kill_requests(exec_ctx, server, + &server->unregistered_request_matchers[i]); + request_matcher_zombify_all_pending_calls( + exec_ctx, &server->unregistered_request_matchers[i]); + for (registered_method *rm = server->registered_methods; rm; + rm = rm->next) { + request_matcher_kill_requests(exec_ctx, server, + &rm->request_matchers[i]); + request_matcher_zombify_all_pending_calls(exec_ctx, + &rm->request_matchers[i]); + } } } } @@ -1036,6 +1044,7 @@ void grpc_server_start(grpc_server *server) { GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server)); + server->started = true; server->pollsets = gpr_malloc(sizeof(grpc_pollset *) * server->cq_count); server->unregistered_request_matchers = gpr_malloc( sizeof(*server->unregistered_request_matchers) * server->cq_count); diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 187720e1de..f97f33712e 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -518,134 +518,6 @@ 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_flush(exec_ctx); - gpr_free(pollset); -} - -/* 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]; - 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; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - for (i = 0; i < 2; 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]); - } - - /* 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); - - /* 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; - - 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); - - /* 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); - } - - /* 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]); - } - - grpc_exec_ctx_finish(&exec_ctx); -} - int main(int argc, char **argv) { grpc_closure destroyed; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -655,8 +527,6 @@ 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(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); -- cgit v1.2.3 From 93dd0470cf26aed445b40a8b9332e6b06f5e5514 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 May 2016 15:06:37 -0700 Subject: clang-format --- src/core/ext/client_config/subchannel_index.c | 4 ++-- src/core/ext/transport/chttp2/transport/frame_goaway.c | 3 ++- src/core/ext/transport/chttp2/transport/hpack_parser.c | 3 ++- src/core/lib/channel/channel_args.c | 3 ++- src/core/lib/transport/metadata.c | 3 ++- test/core/end2end/fuzzers/api_fuzzer.c | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/client_config/subchannel_index.c b/src/core/ext/client_config/subchannel_index.c index 69de0e78c1..690cb16b96 100644 --- a/src/core/ext/client_config/subchannel_index.c +++ b/src/core/ext/client_config/subchannel_index.c @@ -112,8 +112,8 @@ static int subchannel_key_compare(grpc_subchannel_key *a, 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; + 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, diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index aa25b1a231..827e7a6977 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -137,7 +137,8 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_DEBUG: - if (end != cur) 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 9278a7ac42..ed45bc9cb3 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1446,7 +1446,8 @@ 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)) { + 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; } diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index d95a7bf110..569be4dc28 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -132,7 +132,8 @@ 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]; } - if (a->num_args > 1) 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/transport/metadata.c b/src/core/lib/transport/metadata.c index 53fe03bdc9..82c8e239f6 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -373,7 +373,8 @@ 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 && - (length == 0 || 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 b6150151d5..cacf29e261 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -432,7 +432,7 @@ static void read_metadata(input_stream *inp, size_t *count, } else { *metadata = gpr_malloc(1); } - add_to_free(cs, *metadata); + add_to_free(cs, *metadata); } static call_state *destroy_call(call_state *call) { -- cgit v1.2.3 From db7c35635b9013f3844d6abbd30a81d0b481677f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 19 May 2016 11:02:52 -0700 Subject: Work stealing between affinitized cqs --- src/core/lib/surface/server.c | 160 ++++++++++++++++++++---------------------- 1 file changed, 77 insertions(+), 83 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 4d179d0ab1..54b76d8aa5 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -69,11 +69,6 @@ typedef struct call_data call_data; typedef struct channel_data channel_data; typedef struct registered_method registered_method; -typedef struct { - call_data *next; - call_data *prev; -} call_link; - typedef enum { BATCH_CALL, REGISTERED_CALL } requested_call_type; typedef struct requested_call { @@ -170,10 +165,9 @@ struct call_data { struct request_matcher { grpc_server *server; - size_t cq_idx; call_data *pending_head; call_data *pending_tail; - gpr_stack_lockfree *requests; + gpr_stack_lockfree **requests_per_cq; }; struct registered_method { @@ -182,7 +176,7 @@ struct registered_method { grpc_server_register_method_payload_handling payload_handling; uint32_t flags; /* one request matcher per method per cq */ - request_matcher *request_matchers; + request_matcher request_matcher; registered_method *next; }; @@ -211,7 +205,7 @@ struct grpc_server { registered_method *registered_methods; /** one request matcher for unregistered methods per cq */ - request_matcher *unregistered_request_matchers; + request_matcher unregistered_request_matcher; /** free list of available requested_calls indices */ gpr_stack_lockfree *request_freelist; /** requested call backing data */ @@ -313,16 +307,22 @@ static void channel_broadcaster_shutdown(grpc_exec_ctx *exec_ctx, */ static void request_matcher_init(request_matcher *rm, size_t entries, - size_t cq_idx, grpc_server *server) { + grpc_server *server) { memset(rm, 0, sizeof(*rm)); rm->server = server; - rm->cq_idx = cq_idx; - rm->requests = gpr_stack_lockfree_create(entries); + rm->requests_per_cq = + gpr_malloc(sizeof(*rm->requests_per_cq) * server->cq_count); + for (size_t i = 0; i < server->cq_count; i++) { + rm->requests_per_cq[i] = gpr_stack_lockfree_create(entries); + } } static void request_matcher_destroy(request_matcher *rm) { - GPR_ASSERT(gpr_stack_lockfree_pop(rm->requests) == -1); - gpr_stack_lockfree_destroy(rm->requests); + for (size_t i = 0; i < rm->server->cq_count; i++) { + GPR_ASSERT(gpr_stack_lockfree_pop(rm->requests_per_cq[i]) == -1); + gpr_stack_lockfree_destroy(rm->requests_per_cq[i]); + } + gpr_free(rm->requests_per_cq); } static void kill_zombie(grpc_exec_ctx *exec_ctx, void *elem, bool success) { @@ -348,9 +348,11 @@ static void request_matcher_kill_requests(grpc_exec_ctx *exec_ctx, grpc_server *server, request_matcher *rm) { int request_id; - while ((request_id = gpr_stack_lockfree_pop(rm->requests)) != -1) { - fail_call(exec_ctx, server, rm->cq_idx, - &server->requested_calls[request_id]); + for (size_t i = 0; i < server->cq_count; i++) { + while ((request_id = gpr_stack_lockfree_pop(rm->requests_per_cq[i])) != + -1) { + fail_call(exec_ctx, server, i, &server->requested_calls[request_id]); + } } } @@ -371,23 +373,19 @@ static void server_delete(grpc_exec_ctx *exec_ctx, grpc_server *server) { while ((rm = server->registered_methods) != NULL) { server->registered_methods = rm->next; if (server->started) { - for (i = 0; i < server->cq_count; i++) { - request_matcher_destroy(&rm->request_matchers[i]); - } - gpr_free(rm->request_matchers); + request_matcher_destroy(&rm->request_matcher); } gpr_free(rm->method); gpr_free(rm->host); gpr_free(rm); } + if (server->started) { + request_matcher_destroy(&server->unregistered_request_matcher); + } for (i = 0; i < server->cq_count; i++) { GRPC_CQ_INTERNAL_UNREF(server->cqs[i], "server"); - if (server->started) { - request_matcher_destroy(&server->unregistered_request_matchers[i]); - } } gpr_stack_lockfree_destroy(server->request_freelist); - gpr_free(server->unregistered_request_matchers); gpr_free(server->cqs); gpr_free(server->pollsets); gpr_free(server->shutdown_tags); @@ -506,7 +504,9 @@ static void publish_call(grpc_exec_ctx *exec_ctx, grpc_server *server, } static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - call_data *calld = arg; + grpc_call_element *call_elem = arg; + call_data *calld = call_elem->call_data; + channel_data *chand = call_elem->channel_data; request_matcher *rm = calld->request_matcher; grpc_server *server = rm->server; @@ -521,27 +521,34 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { return; } - int request_id = gpr_stack_lockfree_pop(rm->requests); - if (request_id == -1) { - gpr_mu_lock(&server->mu_call); - gpr_mu_lock(&calld->mu_state); - calld->state = PENDING; - gpr_mu_unlock(&calld->mu_state); - if (rm->pending_head == NULL) { - rm->pending_tail = rm->pending_head = calld; + for (size_t i = 0; i < server->cq_count; i++) { + size_t cq_idx = (chand->cq_idx + i) % server->cq_count; + int request_id = gpr_stack_lockfree_pop(rm->requests_per_cq[cq_idx]); + if (request_id == -1) { + continue; } else { - rm->pending_tail->pending_next = calld; - rm->pending_tail = calld; + gpr_mu_lock(&calld->mu_state); + calld->state = ACTIVATED; + gpr_mu_unlock(&calld->mu_state); + publish_call(exec_ctx, server, calld, cq_idx, + &server->requested_calls[request_id]); + return; /* early out */ } - calld->pending_next = NULL; - gpr_mu_unlock(&server->mu_call); + } + + /* no cq to take the request found: queue it on the slow list */ + gpr_mu_lock(&server->mu_call); + gpr_mu_lock(&calld->mu_state); + calld->state = PENDING; + gpr_mu_unlock(&calld->mu_state); + if (rm->pending_head == NULL) { + rm->pending_tail = rm->pending_head = calld; } else { - gpr_mu_lock(&calld->mu_state); - calld->state = ACTIVATED; - gpr_mu_unlock(&calld->mu_state); - publish_call(exec_ctx, server, calld, rm->cq_idx, - &server->requested_calls[request_id]); + rm->pending_tail->pending_next = calld; + rm->pending_tail = calld; } + calld->pending_next = NULL; + gpr_mu_unlock(&server->mu_call); } static void finish_start_new_rpc( @@ -563,14 +570,14 @@ 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, elem, true); break; case GRPC_SRM_PAYLOAD_READ_INITIAL_BYTE_BUFFER: { grpc_op op; memset(&op, 0, sizeof(op)); op.op = GRPC_OP_RECV_MESSAGE; op.data.recv_message = &calld->payload; - grpc_closure_init(&calld->publish, publish_new_rpc, calld); + grpc_closure_init(&calld->publish, publish_new_rpc, elem); grpc_call_start_batch_and_execute(exec_ctx, calld->call, &op, 1, &calld->publish); break; @@ -599,10 +606,9 @@ static void start_new_rpc(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { if ((rm->flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) && !calld->recv_idempotent_request) continue; - finish_start_new_rpc( - exec_ctx, server, elem, - &rm->server_registered_method->request_matchers[chand->cq_idx], - rm->server_registered_method->payload_handling); + finish_start_new_rpc(exec_ctx, server, elem, + &rm->server_registered_method->request_matcher, + rm->server_registered_method->payload_handling); return; } /* check for a wildcard method definition (no host set) */ @@ -616,15 +622,14 @@ static void start_new_rpc(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { if ((rm->flags & GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) && !calld->recv_idempotent_request) continue; - finish_start_new_rpc( - exec_ctx, server, elem, - &rm->server_registered_method->request_matchers[chand->cq_idx], - rm->server_registered_method->payload_handling); + finish_start_new_rpc(exec_ctx, server, elem, + &rm->server_registered_method->request_matcher, + rm->server_registered_method->payload_handling); return; } } finish_start_new_rpc(exec_ctx, server, elem, - &server->unregistered_request_matchers[chand->cq_idx], + &server->unregistered_request_matcher, GRPC_SRM_PAYLOAD_NONE); } @@ -655,18 +660,14 @@ static int num_channels(grpc_server *server) { static void kill_pending_work_locked(grpc_exec_ctx *exec_ctx, grpc_server *server) { if (server->started) { - for (size_t i = 0; i < server->cq_count; i++) { - request_matcher_kill_requests(exec_ctx, server, - &server->unregistered_request_matchers[i]); - request_matcher_zombify_all_pending_calls( - exec_ctx, &server->unregistered_request_matchers[i]); - for (registered_method *rm = server->registered_methods; rm; - rm = rm->next) { - request_matcher_kill_requests(exec_ctx, server, - &rm->request_matchers[i]); - request_matcher_zombify_all_pending_calls(exec_ctx, - &rm->request_matchers[i]); - } + request_matcher_kill_requests(exec_ctx, server, + &server->unregistered_request_matcher); + request_matcher_zombify_all_pending_calls( + exec_ctx, &server->unregistered_request_matcher); + for (registered_method *rm = server->registered_methods; rm; + rm = rm->next) { + request_matcher_kill_requests(exec_ctx, server, &rm->request_matcher); + request_matcher_zombify_all_pending_calls(exec_ctx, &rm->request_matcher); } } } @@ -1046,21 +1047,14 @@ void grpc_server_start(grpc_server *server) { server->started = true; server->pollsets = gpr_malloc(sizeof(grpc_pollset *) * server->cq_count); - server->unregistered_request_matchers = gpr_malloc( - sizeof(*server->unregistered_request_matchers) * server->cq_count); for (i = 0; i < server->cq_count; i++) { server->pollsets[i] = grpc_cq_pollset(server->cqs[i]); - request_matcher_init(&server->unregistered_request_matchers[i], - server->max_requested_calls, i, server); - for (registered_method *rm = server->registered_methods; rm; - rm = rm->next) { - if (i == 0) { - rm->request_matchers = - gpr_malloc(sizeof(*rm->request_matchers) * server->cq_count); - } - request_matcher_init(&rm->request_matchers[i], - server->max_requested_calls, i, server); - } + } + request_matcher_init(&server->unregistered_request_matcher, + server->max_requested_calls, server); + for (registered_method *rm = server->registered_methods; rm; rm = rm->next) { + request_matcher_init(&rm->request_matcher, server->max_requested_calls, + server); } for (l = server->listeners; l; l = l->next) { @@ -1295,20 +1289,20 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, } switch (rc->type) { case BATCH_CALL: - rm = &server->unregistered_request_matchers[cq_idx]; + rm = &server->unregistered_request_matcher; break; case REGISTERED_CALL: - rm = &rc->data.registered.registered_method->request_matchers[cq_idx]; + rm = &rc->data.registered.registered_method->request_matcher; break; } server->requested_calls[request_id] = *rc; gpr_free(rc); - if (gpr_stack_lockfree_push(rm->requests, request_id)) { + if (gpr_stack_lockfree_push(rm->requests_per_cq[cq_idx], request_id)) { /* this was the first queued request: we need to lock and start matching calls */ gpr_mu_lock(&server->mu_call); while ((calld = rm->pending_head) != NULL) { - request_id = gpr_stack_lockfree_pop(rm->requests); + request_id = gpr_stack_lockfree_pop(rm->requests_per_cq[cq_idx]); if (request_id == -1) break; rm->pending_head = calld->pending_next; gpr_mu_unlock(&server->mu_call); -- cgit v1.2.3 From 8ad69bfab5d69987d9db7c9e85a7449d9708a914 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 20 May 2016 08:48:22 -0700 Subject: Attempt to fix Windows --- src/core/lib/iomgr/tcp_server_windows.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 125f521d87..87cacfe979 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -379,9 +379,10 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, bool from_iocp) { /* The only time we should call our callback, is where we successfully managed to accept a connection, and created an endpoint. */ - if (ep) + if (ep) { sp->server->on_accept_cb(exec_ctx, sp->server->on_accept_cb_arg, ep, - &acceptor); + NULL, &acceptor); + } /* As we were notified from the IOCP of one and exactly one accept, the former socked we created has now either been destroy or assigned to the new connection. We need to create a new one for the next -- cgit v1.2.3 From e004958fd691ba0fa2b9f83df5da79919d4f0313 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 20 May 2016 10:31:09 -0700 Subject: Fix formatting, mem leak, stall --- src/core/lib/iomgr/tcp_server_windows.c | 4 ++-- src/cpp/server/server.cc | 4 +++- test/cpp/end2end/hybrid_end2end_test.cc | 29 +++++++++++++++-------------- 3 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 87cacfe979..e15f8b0cdf 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -380,8 +380,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, bool from_iocp) { /* The only time we should call our callback, is where we successfully managed to accept a connection, and created an endpoint. */ if (ep) { - sp->server->on_accept_cb(exec_ctx, sp->server->on_accept_cb_arg, ep, - NULL, &acceptor); + sp->server->on_accept_cb(exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, + &acceptor); } /* As we were notified from the IOCP of one and exactly one accept, the former socked we created has now either been destroy or assigned diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 854057efbc..f6c3e5747c 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -412,7 +412,9 @@ bool Server::Start(ServerCompletionQueue** cqs, size_t num_cqs) { sync_methods_->push_back(SyncRequest(unknown_method_.get(), nullptr)); } for (size_t i = 0; i < num_cqs; i++) { - new UnimplementedAsyncRequest(this, cqs[i]); + if (cqs[i]->IsFrequentlyPolled()) { + new UnimplementedAsyncRequest(this, cqs[i]); + } } } // Start processing rpcs. diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 0423448154..208e7d589f 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -199,7 +199,8 @@ class HybridEnd2endTest : public ::testing::Test { HybridEnd2endTest() {} void SetUpServer(::grpc::Service* service1, ::grpc::Service* service2, - AsyncGenericService* generic_service) { + AsyncGenericService* generic_service, + int num_cqs_frequently_polled) { int port = grpc_pick_unused_port_or_die(); server_address_ << "localhost:" << port; @@ -216,7 +217,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(false)); + cqs_.push_back(builder.AddCompletionQueue(i < num_cqs_frequently_polled)); } server_ = builder.BuildAndStart(); } @@ -346,7 +347,7 @@ class HybridEnd2endTest : public ::testing::Test { TEST_F(HybridEnd2endTest, AsyncEcho) { EchoTestService::WithAsyncMethod_Echo service; - SetUpServer(&service, nullptr, nullptr); + SetUpServer(&service, nullptr, nullptr, 1); ResetStub(); std::thread echo_handler_thread( [this, &service] { HandleEcho(&service, cqs_[0].get(), false); }); @@ -358,7 +359,7 @@ TEST_F(HybridEnd2endTest, AsyncEchoRequestStream) { EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithAsyncMethod_Echo > service; - SetUpServer(&service, nullptr, nullptr); + SetUpServer(&service, nullptr, nullptr, 2); ResetStub(); std::thread echo_handler_thread( [this, &service] { HandleEcho(&service, cqs_[0].get(), false); }); @@ -373,7 +374,7 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream) { EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithAsyncMethod_ResponseStream > service; - SetUpServer(&service, nullptr, nullptr); + SetUpServer(&service, nullptr, nullptr, 2); ResetStub(); std::thread response_stream_handler_thread( [this, &service] { HandleServerStreaming(&service, cqs_[0].get()); }); @@ -390,7 +391,7 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) { EchoTestService::WithAsyncMethod_ResponseStream > service; TestServiceImplDupPkg dup_service; - SetUpServer(&service, &dup_service, nullptr); + SetUpServer(&service, &dup_service, nullptr, 2); ResetStub(); std::thread response_stream_handler_thread( [this, &service] { HandleServerStreaming(&service, cqs_[0].get()); }); @@ -408,7 +409,7 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_AsyncDupService) { EchoTestService::WithAsyncMethod_ResponseStream > service; duplicate::EchoTestService::AsyncService dup_service; - SetUpServer(&service, &dup_service, nullptr); + SetUpServer(&service, &dup_service, nullptr, 3); ResetStub(); std::thread response_stream_handler_thread( [this, &service] { HandleServerStreaming(&service, cqs_[0].get()); }); @@ -426,7 +427,7 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_AsyncDupService) { TEST_F(HybridEnd2endTest, GenericEcho) { EchoTestService::WithGenericMethod_Echo service; AsyncGenericService generic_service; - SetUpServer(&service, nullptr, &generic_service); + SetUpServer(&service, nullptr, &generic_service, 1); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { HandleGenericCall(&generic_service, cqs_[0].get()); @@ -440,7 +441,7 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) { EchoTestService::WithGenericMethod_Echo > service; AsyncGenericService generic_service; - SetUpServer(&service, nullptr, &generic_service); + SetUpServer(&service, nullptr, &generic_service, 2); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { HandleGenericCall(&generic_service, cqs_[0].get()); @@ -459,7 +460,7 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) { service; AsyncGenericService generic_service; TestServiceImplDupPkg dup_service; - SetUpServer(&service, &dup_service, &generic_service); + SetUpServer(&service, &dup_service, &generic_service, 2); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { HandleGenericCall(&generic_service, cqs_[0].get()); @@ -479,7 +480,7 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_AsyncDupService) { service; AsyncGenericService generic_service; duplicate::EchoTestService::AsyncService dup_service; - SetUpServer(&service, &dup_service, &generic_service); + SetUpServer(&service, &dup_service, &generic_service, 3); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { HandleGenericCall(&generic_service, cqs_[0].get()); @@ -501,7 +502,7 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { EchoTestService::WithAsyncMethod_ResponseStream > > service; AsyncGenericService generic_service; - SetUpServer(&service, nullptr, &generic_service); + SetUpServer(&service, nullptr, &generic_service, 3); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { HandleGenericCall(&generic_service, cqs_[0].get()); @@ -522,7 +523,7 @@ TEST_F(HybridEnd2endTest, GenericEchoRequestStreamAsyncResponseStream) { EchoTestService::WithAsyncMethod_ResponseStream > > service; AsyncGenericService generic_service; - SetUpServer(&service, nullptr, &generic_service); + SetUpServer(&service, nullptr, &generic_service, 3); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { HandleGenericCall(&generic_service, cqs_[0].get()); @@ -545,7 +546,7 @@ TEST_F(HybridEnd2endTest, GenericMethodWithoutGenericService) { EchoTestService::WithGenericMethod_Echo< EchoTestService::WithAsyncMethod_ResponseStream > > service; - SetUpServer(&service, nullptr, nullptr); + SetUpServer(&service, nullptr, nullptr, 0); EXPECT_EQ(nullptr, server_.get()); } -- cgit v1.2.3 From d88e15cee750cd647a900098d82f87cc25aa8dbe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 20 May 2016 12:22:37 -0700 Subject: Remove legacy poller --- 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/ev_poll_and_epoll_posix.c | 1978 -------------------- src/core/lib/iomgr/ev_poll_and_epoll_posix.h | 41 - src/core/lib/iomgr/ev_poll_posix.c | 2 + src/core/lib/iomgr/ev_posix.c | 3 +- src/python/grpcio/grpc_core_dependencies.py | 1 - third_party/protobuf | 2 +- tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/run_tests.py | 2 +- tools/run_tests/sources_and_headers.json | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 - 21 files changed, 5 insertions(+), 2066 deletions(-) delete mode 100644 src/core/lib/iomgr/ev_poll_and_epoll_posix.c delete mode 100644 src/core/lib/iomgr/ev_poll_and_epoll_posix.h (limited to 'src/core') diff --git a/BUILD b/BUILD index 793c1c714d..0f8d8c7710 100644 --- a/BUILD +++ b/BUILD @@ -178,7 +178,6 @@ 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_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", @@ -313,7 +312,6 @@ 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_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", @@ -531,7 +529,6 @@ 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_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", @@ -652,7 +649,6 @@ 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_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", @@ -1345,7 +1341,6 @@ 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/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", @@ -1542,7 +1537,6 @@ 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/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", diff --git a/Makefile b/Makefile index c93c9a4241..949f8669c7 100644 --- a/Makefile +++ b/Makefile @@ -2510,7 +2510,6 @@ 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/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 \ @@ -2857,7 +2856,6 @@ 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/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 \ diff --git a/binding.gyp b/binding.gyp index 760bb24d72..442a14762c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -581,7 +581,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_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', diff --git a/build.yaml b/build.yaml index 68e814f76c..acf2f9307f 100644 --- a/build.yaml +++ b/build.yaml @@ -165,7 +165,6 @@ filegroups: - 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_poll_posix.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h @@ -240,7 +239,6 @@ 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/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 diff --git a/config.m4 b/config.m4 index 6ed1887fef..8f2cfa24a4 100644 --- a/config.m4 +++ b/config.m4 @@ -100,7 +100,6 @@ 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/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 \ diff --git a/gRPC.podspec b/gRPC.podspec index 67e7a8174f..ea02aa3487 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -181,7 +181,6 @@ 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/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', @@ -350,7 +349,6 @@ 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/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', @@ -531,7 +529,6 @@ 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/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', diff --git a/grpc.gemspec b/grpc.gemspec index 13aed6b61c..72f044258b 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -190,7 +190,6 @@ 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/ev_poll_and_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 ) @@ -329,7 +328,6 @@ 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/ev_poll_and_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 a169ad24e7..a9b0ee4be2 100644 --- a/package.xml +++ b/package.xml @@ -197,7 +197,6 @@ - @@ -336,7 +335,6 @@ - diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c deleted file mode 100644 index 943c404f91..0000000000 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ /dev/null @@ -1,1978 +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 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/lib/iomgr/ev_poll_and_epoll_posix.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#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 - */ - -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; - - /* The pollset that last noticed and notified that the fd is readable */ - grpc_pollset *read_notifier_pollset; -}; - -/* 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, - grpc_pollset *read_notifier_pollset); - -/* 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_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); - -/******************************************************************************* - * 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->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; - r->read_notifier_pollset = NULL; - 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 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_read_notifier_pollset_locked( - grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_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); - 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); -} - -/* 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) { - 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, - grpc_pollset *read_notifier_pollset) { - 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 (read_notifier_pollset != NULL) { - set_read_notifier_pollset_locked(exec_ctx, fd, read_notifier_pollset); - } - } - 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"); -} - -/******************************************************************************* - * 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); - } 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) { - /* 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) { - 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_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); -} - -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) { - gpr_mu_init(&pollset->mu); - *mu = &pollset->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; - } - gpr_mu_destroy(&pollset->mu); -} - -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, NULL); - } - } else if (r == 0) { - if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); - } - } 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, pollset); - } else if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); - } - } - - 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 - */ - -#ifndef GPR_LINUX_MULTIPOLL_WITH_EPOLL - -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]; - GRPC_FD_REF(watchers[pfd_count].fd, "multipoller_start"); - 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++) { - 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 - 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, NULL); - } - } else if (r == 0) { - for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); - } - } 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, NULL); - continue; - } - fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, - pfds[i].revents & POLLOUT_CHECK, pollset); - } - } - - 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"); - } -} - -#endif /* !GPR_LINUX_MULTIPOLL_WITH_EPOLL */ - -/******************************************************************************* - * pollset_multipoller_with_epoll_posix.c - */ - -#ifdef GPR_LINUX_MULTIPOLL_WITH_EPOLL - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "src/core/lib/iomgr/ev_posix.h" -#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, - 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, - 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, NULL); -} - -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); -} - -typedef struct { - grpc_pollset *pollset; - grpc_fd *fd; - grpc_closure closure; -} delayed_add; - -typedef struct { int epoll_fd; } epoll_hdr; - -static void finally_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd) { - epoll_hdr *h = pollset->data.ptr; - struct epoll_event ev; - int err; - grpc_fd_watcher watcher; - - /* We pretend to be polling whilst adding an fd to keep the fd 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. */ - GPR_ASSERT(fd_begin_poll(fd, pollset, NULL, 0, 0, &watcher) == 0); - if (watcher.fd != NULL) { - ev.events = (uint32_t)(EPOLLIN | EPOLLOUT | EPOLLET); - ev.data.ptr = fd; - err = epoll_ctl(h->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)); - } - } - } - fd_end_poll(exec_ctx, &watcher, 0, 0, NULL); -} - -static void perform_delayed_add(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_status) { - delayed_add *da = arg; - - if (!fd_is_orphaned(da->fd)) { - finally_add_fd(exec_ctx, da->pollset, da->fd); - } - - gpr_mu_lock(&da->pollset->mu); - da->pollset->in_flight_cbs--; - if (da->pollset->shutting_down) { - /* 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); - } - } - gpr_mu_unlock(&da->pollset->mu); - - GRPC_FD_UNREF(da->fd, "delayed_add"); - - gpr_free(da); -} - -static void multipoll_with_epoll_pollset_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - grpc_fd *fd, - int and_unlock_pollset) { - if (and_unlock_pollset) { - gpr_mu_unlock(&pollset->mu); - finally_add_fd(exec_ctx, pollset, fd); - } else { - delayed_add *da = gpr_malloc(sizeof(*da)); - da->pollset = pollset; - da->fd = fd; - 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); - } -} - -/* 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 ep_rv; - int poll_rv; - epoll_hdr *h = pollset->data.ptr; - 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 = h->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(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)); - } - } 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, pollset); - } - 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) { - epoll_hdr *h = pollset->data.ptr; - close(h->epoll_fd); - remove_epoll_fd_from_global_list(h->epoll_fd); - gpr_free(h); -} - -static const grpc_pollset_vtable multipoll_with_epoll_pollset = { - multipoll_with_epoll_pollset_add_fd, - multipoll_with_epoll_pollset_maybe_work_and_unlock, - multipoll_with_epoll_pollset_finish_shutdown, - multipoll_with_epoll_pollset_destroy}; - -static void epoll_become_multipoller(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, grpc_fd **fds, - size_t nfds) { - size_t i; - epoll_hdr *h = gpr_malloc(sizeof(epoll_hdr)); - struct epoll_event ev; - int err; - - pollset->vtable = &multipoll_with_epoll_pollset; - pollset->data.ptr = h; - h->epoll_fd = epoll_create1(EPOLL_CLOEXEC); - if (h->epoll_fd < 0) { - /* TODO(klempner): Fall back to poll here, especially on ENOSYS */ - gpr_log(GPR_ERROR, "epoll_create1 failed: %s", strerror(errno)); - abort(); - } - add_epoll_fd_to_global_list(h->epoll_fd); - - ev.events = (uint32_t)(EPOLLIN | EPOLLET); - ev.data.ptr = NULL; - err = epoll_ctl(h->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)); - } - - for (i = 0; i < nfds; i++) { - multipoll_with_epoll_pollset_add_fd(exec_ctx, pollset, fds[i], 0); - } -} - -#else /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ - -static void remove_fd_from_all_epoll_sets(int fd) {} - -#endif /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ - -/******************************************************************************* - * 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, - .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, - - .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_and_epoll_posix(void) { -#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(); - return &vtable; -} - -#endif diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.h b/src/core/lib/iomgr/ev_poll_and_epoll_posix.h deleted file mode 100644 index 06d6dbf29d..0000000000 --- a/src/core/lib/iomgr/ev_poll_and_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_POLL_AND_EPOLL_POSIX_H -#define GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H - -#include "src/core/lib/iomgr/ev_posix.h" - -const grpc_event_engine_vtable *grpc_init_poll_and_epoll_posix(void); - -#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H */ diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index fafb3b4b6f..4d2ec5eb98 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -59,6 +59,8 @@ * FD declarations */ +grpc_wakeup_fd grpc_global_wakeup_fd; + typedef struct grpc_fd_watcher { struct grpc_fd_watcher *next; struct grpc_fd_watcher *prev; diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 6477b05dcd..95520b01d3 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -44,7 +44,6 @@ #include #include -#include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" @@ -62,7 +61,7 @@ typedef struct { } event_engine_factory; static const event_engine_factory g_factories[] = { - {"poll", grpc_init_poll_posix}, {"legacy", grpc_init_poll_and_epoll_posix}, + {"poll", grpc_init_poll_posix}, }; static void add(const char *beg, const char *end, char ***ss, size_t *ns) { diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 162191b06d..aa79c8c2a8 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -94,7 +94,6 @@ 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/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', diff --git a/third_party/protobuf b/third_party/protobuf index 3470b6895a..a1938b2aa9 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 +Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 212dfc3160..5afed4201a 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -807,7 +807,6 @@ 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_poll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -946,7 +945,6 @@ 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 \ diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 5f0943b440..0538dce419 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -157,7 +157,7 @@ class CLanguage(object): 'windows': ['all'], 'mac': ['all'], 'posix': ['all'], - 'linux': ['poll'], # DISABLED DUE TO BUGS: 'legacy' + 'linux': ['poll'], } for target in binaries: polling_strategies = (POLLING_STRATEGIES[self.platform] diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 3866ebb0e5..64a49f5f76 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5645,7 +5645,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_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", @@ -5745,8 +5744,6 @@ "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/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_and_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/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index a20d386fa3..2dba1de384 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -316,7 +316,6 @@ - @@ -475,8 +474,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index d5465176a2..1c78919370 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -55,9 +55,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -653,9 +650,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 09748f082c..90ad80f2fc 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -304,7 +304,6 @@ - @@ -450,8 +449,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a85bfeefe6..2b19c0fb34 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -58,9 +58,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -575,9 +572,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr -- cgit v1.2.3 From c68eb0609a11db31b81b709a049771908c547110 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 13 May 2016 14:49:32 -0700 Subject: Bugfix to work with empty messages --- .../transport/cronet/transport/cronet_transport.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 5bb085195c..df160aaaf6 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -218,8 +218,11 @@ 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, (size_t)s->total_read_bytes); - gpr_slice_buffer_add(&s->read_slice_buffer, read_data_slice); + if (s->total_read_bytes > 0) { + // Only copy if there is non-zero number of 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; } @@ -347,8 +350,17 @@ static void next_recv_step(stream_obj *s, enum e_caller caller) { 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 (s->remaining_read_bytes > 0) { + cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer, + s->remaining_read_bytes); + } else { + // Calling the closing callback directly since this is a 0 byte read + // for an empty message. + process_recv_message(s, NULL); + enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); + invoke_closing_callback(s); + set_recv_state(s, CRONET_RECV_CLOSED); + } } } break; -- cgit v1.2.3 From ae09d9dca9ac0f6d6c6e877e2935ad8cfba9da05 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 20 May 2016 22:23:37 -0700 Subject: Fixes and code simplification --- src/core/lib/iomgr/ev_poll_posix.c | 40 ++++----------------------------- src/core/lib/surface/server.c | 9 ++++++++ test/cpp/end2end/hybrid_end2end_test.cc | 21 ++++++++++++++--- 3 files changed, 31 insertions(+), 39 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 4d2ec5eb98..4f64d31c97 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -183,7 +183,6 @@ struct grpc_pollset_worker { struct grpc_pollset { gpr_mu mu; grpc_pollset_worker root_worker; - int in_flight_cbs; int shutting_down; int called_shutdown; int kicked_without_pollers; @@ -193,10 +192,6 @@ struct grpc_pollset { 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; }; @@ -728,7 +723,6 @@ 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->in_flight_cbs = 0; pollset->shutting_down = 0; pollset->called_shutdown = 0; pollset->kicked_without_pollers = 0; @@ -737,14 +731,10 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { 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; } 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); while (pollset->local_wakeup_cache) { @@ -754,17 +744,14 @@ static void pollset_destroy(grpc_pollset *pollset) { pollset->local_wakeup_cache = next; } gpr_free(pollset->fds); - gpr_free(pollset->dels); gpr_mu_destroy(&pollset->mu); } 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); 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; @@ -797,11 +784,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { 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); } @@ -841,13 +824,6 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, 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) */ @@ -867,7 +843,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, int timeout; int r; - size_t i, j, fd_count; + size_t i, fd_count; nfds_t pfd_count; /* TODO(ctiller): inline some elements to avoid an allocation */ grpc_fd_watcher *watchers; @@ -887,11 +863,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, 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) { + if (fd_is_orphaned(pollset->fds[i])) { GRPC_FD_UNREF(pollset->fds[i], "multipoller"); } else { pollset->fds[fd_count++] = pollset->fds[i]; @@ -902,10 +874,6 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, 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); @@ -997,7 +965,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (pollset->shutting_down) { if (pollset_has_workers(pollset)) { pollset_kick(pollset, NULL); - } else if (!pollset->called_shutdown && pollset->in_flight_cbs == 0) { + } else if (!pollset->called_shutdown) { pollset->called_shutdown = 1; gpr_mu_unlock(&pollset->mu); finish_shutdown(exec_ctx, pollset); @@ -1027,7 +995,7 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, 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 && + if (!pollset->called_shutdown && !pollset_has_workers(pollset)) { pollset->called_shutdown = 1; finish_shutdown(exec_ctx, pollset); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 54b76d8aa5..165e20a062 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -527,6 +527,8 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { if (request_id == -1) { continue; } else { + gpr_log(GPR_DEBUG, "queue lockfree, retries=%d chose=%d", i, cq_idx); + gpr_mu_lock(&calld->mu_state); calld->state = ACTIVATED; gpr_mu_unlock(&calld->mu_state); @@ -537,6 +539,7 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } /* no cq to take the request found: queue it on the slow list */ + gpr_log(GPR_DEBUG, "queue slowpath"); gpr_mu_lock(&server->mu_call); gpr_mu_lock(&calld->mu_state); calld->state = PENDING; @@ -1298,12 +1301,14 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, server->requested_calls[request_id] = *rc; gpr_free(rc); if (gpr_stack_lockfree_push(rm->requests_per_cq[cq_idx], request_id)) { + gpr_log(GPR_DEBUG, "request against empty"); /* this was the first queued request: we need to lock and start matching calls */ gpr_mu_lock(&server->mu_call); while ((calld = rm->pending_head) != NULL) { request_id = gpr_stack_lockfree_pop(rm->requests_per_cq[cq_idx]); if (request_id == -1) break; + gpr_log(GPR_DEBUG, "drain1"); rm->pending_head = calld->pending_next; gpr_mu_unlock(&server->mu_call); gpr_mu_lock(&calld->mu_state); @@ -1324,6 +1329,8 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&server->mu_call); } gpr_mu_unlock(&server->mu_call); + } else { + gpr_log(GPR_DEBUG, "request lockfree"); } return GRPC_CALL_OK; } @@ -1377,6 +1384,7 @@ grpc_call_error grpc_server_request_registered_call( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = gpr_malloc(sizeof(*rc)); registered_method *rm = rmp; + gpr_log(GPR_DEBUG, "method: %s", rm->method); GRPC_API_TRACE( "grpc_server_request_registered_call(" "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " @@ -1391,6 +1399,7 @@ grpc_call_error grpc_server_request_registered_call( break; } } + gpr_log(GPR_DEBUG, "cq_idx=%d, cq_count=%d", cq_idx, server->cq_count); if (cq_idx == server->cq_count) { gpr_free(rc); error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 208e7d589f..b4270070e2 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -217,7 +217,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(i < num_cqs_frequently_polled)); + cqs_.push_back(builder.AddCompletionQueue(i == num_cqs_frequently_polled - 1)); } server_ = builder.BuildAndStart(); } @@ -253,6 +253,7 @@ class HybridEnd2endTest : public ::testing::Test { EchoRequest send_request; EchoResponse recv_response; ClientContext cli_ctx; + cli_ctx.set_fail_fast(false); send_request.set_message("Hello"); Status recv_status = stub_->Echo(&cli_ctx, send_request, &recv_response); EXPECT_EQ(send_request.message(), recv_response.message()); @@ -266,6 +267,7 @@ class HybridEnd2endTest : public ::testing::Test { EchoRequest send_request; EchoResponse recv_response; ClientContext cli_ctx; + cli_ctx.set_fail_fast(false); send_request.set_message("Hello"); Status recv_status = stub->Echo(&cli_ctx, send_request, &recv_response); EXPECT_EQ(send_request.message() + "_dup", recv_response.message()); @@ -277,6 +279,7 @@ class HybridEnd2endTest : public ::testing::Test { EchoResponse recv_response; grpc::string expected_message; ClientContext cli_ctx; + cli_ctx.set_fail_fast(false); send_request.set_message("Hello"); auto stream = stub_->RequestStream(&cli_ctx, &recv_response); for (int i = 0; i < 5; i++) { @@ -293,6 +296,7 @@ class HybridEnd2endTest : public ::testing::Test { EchoRequest request; EchoResponse response; ClientContext context; + context.set_fail_fast(false); request.set_message("hello"); auto stream = stub_->ResponseStream(&context, request); @@ -312,6 +316,7 @@ class HybridEnd2endTest : public ::testing::Test { EchoRequest request; EchoResponse response; ClientContext context; + context.set_fail_fast(false); grpc::string msg("hello"); auto stream = stub_->BidiStream(&context); @@ -505,12 +510,22 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { SetUpServer(&service, nullptr, &generic_service, 3); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { + gpr_log(GPR_DEBUG, "t0 start"); HandleGenericCall(&generic_service, cqs_[0].get()); + gpr_log(GPR_DEBUG, "t0 done"); }); std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); + [this, &service] { + gpr_log(GPR_DEBUG, "t1 start"); + HandleClientStreaming(&service, cqs_[1].get()); + gpr_log(GPR_DEBUG, "t1 done"); + }); std::thread response_stream_handler_thread( - [this, &service] { HandleServerStreaming(&service, cqs_[2].get()); }); + [this, &service] { + gpr_log(GPR_DEBUG, "t2 start"); + HandleServerStreaming(&service, cqs_[2].get()); + gpr_log(GPR_DEBUG, "t2 done"); + }); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); -- cgit v1.2.3 From 509b30e7396b617693a3c93f4c2fd4ec417a96a1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 21 May 2016 12:32:39 -0700 Subject: Fix non-listening cq registration so that calls can be queued against them --- src/core/lib/surface/server.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 165e20a062..b1d8b575a7 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -933,16 +933,15 @@ static void register_completion_queue(grpc_server *server, grpc_cq_mark_server_cq(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; } + + 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, @@ -1049,9 +1048,12 @@ void grpc_server_start(grpc_server *server) { GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server)); server->started = true; + size_t pollset_count = 0; server->pollsets = gpr_malloc(sizeof(grpc_pollset *) * server->cq_count); for (i = 0; i < server->cq_count; i++) { - server->pollsets[i] = grpc_cq_pollset(server->cqs[i]); + if (!grpc_cq_is_non_listening_server_cq(server->cqs[i])) { + server->pollsets[pollset_count++] = grpc_cq_pollset(server->cqs[i]); + } } request_matcher_init(&server->unregistered_request_matcher, server->max_requested_calls, server); @@ -1061,7 +1063,7 @@ void grpc_server_start(grpc_server *server) { } for (l = server->listeners; l; l = l->next) { - l->start(&exec_ctx, server, l->arg, server->pollsets, server->cq_count); + l->start(&exec_ctx, server, l->arg, server->pollsets, pollset_count); } grpc_exec_ctx_finish(&exec_ctx); -- cgit v1.2.3 From 3f3312e7e92892c6625feecded6fbf09815689f0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 21 May 2016 12:35:29 -0700 Subject: Remove spam --- src/core/lib/surface/server.c | 9 --------- test/cpp/end2end/hybrid_end2end_test.cc | 17 ++++------------- 2 files changed, 4 insertions(+), 22 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index b1d8b575a7..6be65f7033 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -527,8 +527,6 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { if (request_id == -1) { continue; } else { - gpr_log(GPR_DEBUG, "queue lockfree, retries=%d chose=%d", i, cq_idx); - gpr_mu_lock(&calld->mu_state); calld->state = ACTIVATED; gpr_mu_unlock(&calld->mu_state); @@ -539,7 +537,6 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } /* no cq to take the request found: queue it on the slow list */ - gpr_log(GPR_DEBUG, "queue slowpath"); gpr_mu_lock(&server->mu_call); gpr_mu_lock(&calld->mu_state); calld->state = PENDING; @@ -1303,14 +1300,12 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, server->requested_calls[request_id] = *rc; gpr_free(rc); if (gpr_stack_lockfree_push(rm->requests_per_cq[cq_idx], request_id)) { - gpr_log(GPR_DEBUG, "request against empty"); /* this was the first queued request: we need to lock and start matching calls */ gpr_mu_lock(&server->mu_call); while ((calld = rm->pending_head) != NULL) { request_id = gpr_stack_lockfree_pop(rm->requests_per_cq[cq_idx]); if (request_id == -1) break; - gpr_log(GPR_DEBUG, "drain1"); rm->pending_head = calld->pending_next; gpr_mu_unlock(&server->mu_call); gpr_mu_lock(&calld->mu_state); @@ -1331,8 +1326,6 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&server->mu_call); } gpr_mu_unlock(&server->mu_call); - } else { - gpr_log(GPR_DEBUG, "request lockfree"); } return GRPC_CALL_OK; } @@ -1386,7 +1379,6 @@ grpc_call_error grpc_server_request_registered_call( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = gpr_malloc(sizeof(*rc)); registered_method *rm = rmp; - gpr_log(GPR_DEBUG, "method: %s", rm->method); GRPC_API_TRACE( "grpc_server_request_registered_call(" "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " @@ -1401,7 +1393,6 @@ grpc_call_error grpc_server_request_registered_call( break; } } - gpr_log(GPR_DEBUG, "cq_idx=%d, cq_count=%d", cq_idx, server->cq_count); if (cq_idx == server->cq_count) { gpr_free(rc); error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index b4270070e2..a19fccbb6b 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -217,7 +217,8 @@ 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(i == num_cqs_frequently_polled - 1)); + cqs_.push_back( + builder.AddCompletionQueue(i == num_cqs_frequently_polled - 1)); } server_ = builder.BuildAndStart(); } @@ -510,22 +511,12 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { SetUpServer(&service, nullptr, &generic_service, 3); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { - gpr_log(GPR_DEBUG, "t0 start"); HandleGenericCall(&generic_service, cqs_[0].get()); - gpr_log(GPR_DEBUG, "t0 done"); }); std::thread request_stream_handler_thread( - [this, &service] { - gpr_log(GPR_DEBUG, "t1 start"); - HandleClientStreaming(&service, cqs_[1].get()); - gpr_log(GPR_DEBUG, "t1 done"); - }); + [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); std::thread response_stream_handler_thread( - [this, &service] { - gpr_log(GPR_DEBUG, "t2 start"); - HandleServerStreaming(&service, cqs_[2].get()); - gpr_log(GPR_DEBUG, "t2 done"); - }); + [this, &service] { HandleServerStreaming(&service, cqs_[2].get()); }); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); -- cgit v1.2.3 From fa96d86a99137fc5a3581413c752603ffa731b93 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 21 May 2016 12:39:56 -0700 Subject: Fix comments --- src/core/lib/surface/server.c | 4 ++-- src/cpp/server/server_builder.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 6be65f7033..505b501968 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -175,7 +175,7 @@ struct registered_method { char *host; grpc_server_register_method_payload_handling payload_handling; uint32_t flags; - /* one request matcher per method per cq */ + /* one request matcher per method */ request_matcher request_matcher; registered_method *next; }; @@ -204,7 +204,7 @@ struct grpc_server { gpr_mu mu_call; /* mutex for call-specific state */ registered_method *registered_methods; - /** one request matcher for unregistered methods per cq */ + /** one request matcher for unregistered methods */ request_matcher unregistered_request_matcher; /** free list of available requested_calls indices */ gpr_stack_lockfree *request_freelist; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 5966e548b0..54feac3982 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -119,6 +119,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { if ((*plugin).second->has_sync_methods()) { thread_pool.reset(CreateDefaultThreadPool()); + has_sync_methods = true; break; } } -- cgit v1.2.3 From 4265fa1e66b72c2ccf2e3c5fecc4b2012b0637c3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 21 May 2016 12:40:53 -0700 Subject: clang-format --- src/core/lib/iomgr/ev_poll_posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 4f64d31c97..e2a21230b9 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -995,8 +995,7 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (!pollset_has_workers(pollset)) { grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs, NULL); } - if (!pollset->called_shutdown && - !pollset_has_workers(pollset)) { + if (!pollset->called_shutdown && !pollset_has_workers(pollset)) { pollset->called_shutdown = 1; finish_shutdown(exec_ctx, pollset); } -- cgit v1.2.3 From e76528ce267e06024224ad52d2874384df26d0a1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 21 May 2016 12:43:17 -0700 Subject: Revert "Remove spam" This reverts commit 3f3312e7e92892c6625feecded6fbf09815689f0. --- src/core/lib/surface/server.c | 9 +++++++++ test/cpp/end2end/hybrid_end2end_test.cc | 17 +++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 505b501968..7a1f3a2e54 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -527,6 +527,8 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { if (request_id == -1) { continue; } else { + gpr_log(GPR_DEBUG, "queue lockfree, retries=%d chose=%d", i, cq_idx); + gpr_mu_lock(&calld->mu_state); calld->state = ACTIVATED; gpr_mu_unlock(&calld->mu_state); @@ -537,6 +539,7 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } /* no cq to take the request found: queue it on the slow list */ + gpr_log(GPR_DEBUG, "queue slowpath"); gpr_mu_lock(&server->mu_call); gpr_mu_lock(&calld->mu_state); calld->state = PENDING; @@ -1300,12 +1303,14 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, server->requested_calls[request_id] = *rc; gpr_free(rc); if (gpr_stack_lockfree_push(rm->requests_per_cq[cq_idx], request_id)) { + gpr_log(GPR_DEBUG, "request against empty"); /* this was the first queued request: we need to lock and start matching calls */ gpr_mu_lock(&server->mu_call); while ((calld = rm->pending_head) != NULL) { request_id = gpr_stack_lockfree_pop(rm->requests_per_cq[cq_idx]); if (request_id == -1) break; + gpr_log(GPR_DEBUG, "drain1"); rm->pending_head = calld->pending_next; gpr_mu_unlock(&server->mu_call); gpr_mu_lock(&calld->mu_state); @@ -1326,6 +1331,8 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&server->mu_call); } gpr_mu_unlock(&server->mu_call); + } else { + gpr_log(GPR_DEBUG, "request lockfree"); } return GRPC_CALL_OK; } @@ -1379,6 +1386,7 @@ grpc_call_error grpc_server_request_registered_call( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = gpr_malloc(sizeof(*rc)); registered_method *rm = rmp; + gpr_log(GPR_DEBUG, "method: %s", rm->method); GRPC_API_TRACE( "grpc_server_request_registered_call(" "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " @@ -1393,6 +1401,7 @@ grpc_call_error grpc_server_request_registered_call( break; } } + gpr_log(GPR_DEBUG, "cq_idx=%d, cq_count=%d", cq_idx, server->cq_count); if (cq_idx == server->cq_count) { gpr_free(rc); error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index a19fccbb6b..b4270070e2 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -217,8 +217,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(i == num_cqs_frequently_polled - 1)); + cqs_.push_back(builder.AddCompletionQueue(i == num_cqs_frequently_polled - 1)); } server_ = builder.BuildAndStart(); } @@ -511,12 +510,22 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { SetUpServer(&service, nullptr, &generic_service, 3); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { + gpr_log(GPR_DEBUG, "t0 start"); HandleGenericCall(&generic_service, cqs_[0].get()); + gpr_log(GPR_DEBUG, "t0 done"); }); std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); + [this, &service] { + gpr_log(GPR_DEBUG, "t1 start"); + HandleClientStreaming(&service, cqs_[1].get()); + gpr_log(GPR_DEBUG, "t1 done"); + }); std::thread response_stream_handler_thread( - [this, &service] { HandleServerStreaming(&service, cqs_[2].get()); }); + [this, &service] { + gpr_log(GPR_DEBUG, "t2 start"); + HandleServerStreaming(&service, cqs_[2].get()); + gpr_log(GPR_DEBUG, "t2 done"); + }); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); -- cgit v1.2.3 From bc7593de7a58fdf5b3e8d59fee40edfaa75785f4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 21 May 2016 13:05:44 -0700 Subject: Revert "Revert "Remove spam"" This reverts commit e76528ce267e06024224ad52d2874384df26d0a1. --- src/core/lib/surface/server.c | 9 --------- test/cpp/end2end/hybrid_end2end_test.cc | 14 ++------------ 2 files changed, 2 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 7a1f3a2e54..505b501968 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -527,8 +527,6 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { if (request_id == -1) { continue; } else { - gpr_log(GPR_DEBUG, "queue lockfree, retries=%d chose=%d", i, cq_idx); - gpr_mu_lock(&calld->mu_state); calld->state = ACTIVATED; gpr_mu_unlock(&calld->mu_state); @@ -539,7 +537,6 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } /* no cq to take the request found: queue it on the slow list */ - gpr_log(GPR_DEBUG, "queue slowpath"); gpr_mu_lock(&server->mu_call); gpr_mu_lock(&calld->mu_state); calld->state = PENDING; @@ -1303,14 +1300,12 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, server->requested_calls[request_id] = *rc; gpr_free(rc); if (gpr_stack_lockfree_push(rm->requests_per_cq[cq_idx], request_id)) { - gpr_log(GPR_DEBUG, "request against empty"); /* this was the first queued request: we need to lock and start matching calls */ gpr_mu_lock(&server->mu_call); while ((calld = rm->pending_head) != NULL) { request_id = gpr_stack_lockfree_pop(rm->requests_per_cq[cq_idx]); if (request_id == -1) break; - gpr_log(GPR_DEBUG, "drain1"); rm->pending_head = calld->pending_next; gpr_mu_unlock(&server->mu_call); gpr_mu_lock(&calld->mu_state); @@ -1331,8 +1326,6 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&server->mu_call); } gpr_mu_unlock(&server->mu_call); - } else { - gpr_log(GPR_DEBUG, "request lockfree"); } return GRPC_CALL_OK; } @@ -1386,7 +1379,6 @@ grpc_call_error grpc_server_request_registered_call( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = gpr_malloc(sizeof(*rc)); registered_method *rm = rmp; - gpr_log(GPR_DEBUG, "method: %s", rm->method); GRPC_API_TRACE( "grpc_server_request_registered_call(" "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " @@ -1401,7 +1393,6 @@ grpc_call_error grpc_server_request_registered_call( break; } } - gpr_log(GPR_DEBUG, "cq_idx=%d, cq_count=%d", cq_idx, server->cq_count); if (cq_idx == server->cq_count) { gpr_free(rc); error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 38c6ba9c94..2c05db345b 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -513,22 +513,12 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { SetUpServer(&service, nullptr, &generic_service); ResetStub(); std::thread generic_handler_thread([this, &generic_service] { - gpr_log(GPR_DEBUG, "t0 start"); HandleGenericCall(&generic_service, cqs_[0].get()); - gpr_log(GPR_DEBUG, "t0 done"); }); std::thread request_stream_handler_thread( - [this, &service] { - gpr_log(GPR_DEBUG, "t1 start"); - HandleClientStreaming(&service, cqs_[1].get()); - gpr_log(GPR_DEBUG, "t1 done"); - }); + [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); std::thread response_stream_handler_thread( - [this, &service] { - gpr_log(GPR_DEBUG, "t2 start"); - HandleServerStreaming(&service, cqs_[2].get()); - gpr_log(GPR_DEBUG, "t2 done"); - }); + [this, &service] { HandleServerStreaming(&service, cqs_[2].get()); }); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); -- cgit v1.2.3 From 53dd6b9e459d6d3fd08f50d820e2aa8486d305f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 24 May 2016 13:49:50 -0700 Subject: Round robin notifier pollset --- src/core/lib/iomgr/tcp_server_posix.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index c695621de8..909e34abc7 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -128,6 +128,9 @@ struct grpc_tcp_server { grpc_pollset **pollsets; /* number of pollsets in the pollsets array */ size_t pollset_count; + + /* next pollset to assign a channel to */ + size_t next_pollset_to_assign; }; grpc_tcp_server *grpc_tcp_server_create(grpc_closure *shutdown_complete) { @@ -145,6 +148,7 @@ grpc_tcp_server *grpc_tcp_server_create(grpc_closure *shutdown_complete) { s->head = NULL; s->tail = NULL; s->nports = 0; + s->next_pollset_to_assign = 0; return s; } @@ -317,7 +321,9 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { goto error; } - read_notifier_pollset = grpc_fd_get_read_notifier_pollset(exec_ctx, sp->emfd); + read_notifier_pollset = + sp->server->pollsets[(sp->server->next_pollset_to_assign++) % + sp->server->pollset_count]; /* loop until accept4 returns EAGAIN, and then re-arm notification */ for (;;) { -- cgit v1.2.3