aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/filter_call_init_fails.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end/tests/filter_call_init_fails.c')
-rw-r--r--test/core/end2end/tests/filter_call_init_fails.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c
index 09e9dbcd7b..ecf0cc3aca 100644
--- a/test/core/end2end/tests/filter_call_init_fails.c
+++ b/test/core/end2end/tests/filter_call_init_fails.c
@@ -38,12 +38,12 @@ static bool g_enable_server_channel_filter = false;
static bool g_enable_client_channel_filter = false;
static bool g_enable_client_subchannel_filter = false;
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
- const char *test_name,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ const char* test_name,
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
@@ -60,14 +60,14 @@ static gpr_timespec five_seconds_from_now(void) {
return n_seconds_from_now(5);
}
-static void drain_cq(grpc_completion_queue *cq) {
+static void drain_cq(grpc_completion_queue* cq) {
grpc_event ev;
do {
ev = grpc_completion_queue_next(cq, five_seconds_from_now(), NULL);
} while (ev.type != GRPC_QUEUE_SHUTDOWN);
}
-static void shutdown_server(grpc_end2end_test_fixture *f) {
+static void shutdown_server(grpc_end2end_test_fixture* f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000));
GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000),
@@ -78,13 +78,13 @@ static void shutdown_server(grpc_end2end_test_fixture *f) {
f->server = NULL;
}
-static void shutdown_client(grpc_end2end_test_fixture *f) {
+static void shutdown_client(grpc_end2end_test_fixture* f) {
if (!f->client) return;
grpc_channel_destroy(f->client);
f->client = NULL;
}
-static void end_test(grpc_end2end_test_fixture *f) {
+static void end_test(grpc_end2end_test_fixture* f) {
shutdown_server(f);
shutdown_client(f);
@@ -97,21 +97,21 @@ static void end_test(grpc_end2end_test_fixture *f) {
// Simple request via a SERVER_CHANNEL filter that always fails to
// initialize the call.
static void test_server_channel_filter(grpc_end2end_test_config config) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_end2end_test_fixture f =
begin_test(config, "filter_call_init_fails", NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
- grpc_byte_buffer *request_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
@@ -193,21 +193,21 @@ static void test_server_channel_filter(grpc_end2end_test_config config) {
// Simple request via a CLIENT_CHANNEL or CLIENT_DIRECT_CHANNEL filter
// that always fails to initialize the call.
static void test_client_channel_filter(grpc_end2end_test_config config) {
- grpc_call *c;
+ grpc_call* c;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_from_now();
grpc_end2end_test_fixture f =
begin_test(config, "filter_call_init_fails", NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
- grpc_byte_buffer *request_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
@@ -283,21 +283,21 @@ static void test_client_channel_filter(grpc_end2end_test_config config) {
// Simple request via a CLIENT_SUBCHANNEL filter that always fails to
// initialize the call.
static void test_client_subchannel_filter(grpc_end2end_test_config config) {
- grpc_call *c;
+ grpc_call* c;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_from_now();
grpc_end2end_test_fixture f =
begin_test(config, "filter_call_init_fails", NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
- grpc_byte_buffer *request_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
@@ -399,26 +399,26 @@ static void test_client_subchannel_filter(grpc_end2end_test_config config) {
* Test filter - always fails to initialize a call
*/
-static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- const grpc_call_element_args *args) {
+static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx,
+ grpc_call_element* elem,
+ const grpc_call_element_args* args) {
return grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("access denied"),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_PERMISSION_DENIED);
}
-static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_final_info *final_info,
- grpc_closure *ignored) {}
+static void destroy_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
+ const grpc_call_final_info* final_info,
+ grpc_closure* ignored) {}
-static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx,
- grpc_channel_element *elem,
- grpc_channel_element_args *args) {
+static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx,
+ grpc_channel_element* elem,
+ grpc_channel_element_args* args) {
return GRPC_ERROR_NONE;
}
-static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
- grpc_channel_element *elem) {}
+static void destroy_channel_elem(grpc_exec_ctx* exec_ctx,
+ grpc_channel_element* elem) {}
static const grpc_channel_filter test_filter = {
grpc_call_next_op,
@@ -437,15 +437,15 @@ static const grpc_channel_filter test_filter = {
* Registration
*/
-static bool maybe_add_server_channel_filter(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack_builder *builder,
- void *arg) {
+static bool maybe_add_server_channel_filter(grpc_exec_ctx* exec_ctx,
+ grpc_channel_stack_builder* builder,
+ void* arg) {
if (g_enable_server_channel_filter) {
// Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we
// can't add it at the very end, because the connected channel filter
// must be the last one. So we add it right before the last one.
- grpc_channel_stack_builder_iterator *it =
+ grpc_channel_stack_builder_iterator* it =
grpc_channel_stack_builder_create_iterator_at_last(builder);
GPR_ASSERT(grpc_channel_stack_builder_move_prev(it));
const bool retval = grpc_channel_stack_builder_add_filter_before(
@@ -457,15 +457,15 @@ static bool maybe_add_server_channel_filter(grpc_exec_ctx *exec_ctx,
}
}
-static bool maybe_add_client_channel_filter(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack_builder *builder,
- void *arg) {
+static bool maybe_add_client_channel_filter(grpc_exec_ctx* exec_ctx,
+ grpc_channel_stack_builder* builder,
+ void* arg) {
if (g_enable_client_channel_filter) {
// Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we
// can't add it at the very end, because the connected channel filter
// must be the last one. So we add it right before the last one.
- grpc_channel_stack_builder_iterator *it =
+ grpc_channel_stack_builder_iterator* it =
grpc_channel_stack_builder_create_iterator_at_last(builder);
GPR_ASSERT(grpc_channel_stack_builder_move_prev(it));
const bool retval = grpc_channel_stack_builder_add_filter_before(
@@ -478,13 +478,13 @@ static bool maybe_add_client_channel_filter(grpc_exec_ctx *exec_ctx,
}
static bool maybe_add_client_subchannel_filter(
- grpc_exec_ctx *exec_ctx, grpc_channel_stack_builder *builder, void *arg) {
+ grpc_exec_ctx* exec_ctx, grpc_channel_stack_builder* builder, void* arg) {
if (g_enable_client_subchannel_filter) {
// Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we
// can't add it at the very end, because the client channel filter
// must be the last one. So we add it right before the last one.
- grpc_channel_stack_builder_iterator *it =
+ grpc_channel_stack_builder_iterator* it =
grpc_channel_stack_builder_create_iterator_at_last(builder);
GPR_ASSERT(grpc_channel_stack_builder_move_prev(it));
const bool retval = grpc_channel_stack_builder_add_filter_before(