aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-06 14:39:17 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-06 14:43:31 -0800
commit40422d5fa621624868280094efb2f01c2cd1352b (patch)
treecbb2baa955e11c03fa004e9e0f4f3037ba3d6150 /test/core/end2end
parentaae4ca01a315a69fcf182d09aea1efdfcda13d48 (diff)
parente759d2ad7abdb0702970eeccc5f033ff4b2a4c7f (diff)
Merge master
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/bad_server_response_test.cc60
-rw-r--r--test/core/end2end/connection_refused_test.cc22
-rw-r--r--test/core/end2end/cq_verifier.cc86
-rw-r--r--test/core/end2end/cq_verifier.h22
-rw-r--r--test/core/end2end/cq_verifier_internal.h6
-rw-r--r--test/core/end2end/cq_verifier_native.cc16
-rw-r--r--test/core/end2end/cq_verifier_uv.cc30
-rw-r--r--test/core/end2end/dualstack_socket_test.cc50
-rw-r--r--test/core/end2end/end2end_nosec_tests.cc8
-rw-r--r--test/core/end2end/end2end_test_utils.cc8
-rw-r--r--test/core/end2end/end2end_tests.cc8
-rw-r--r--test/core/end2end/end2end_tests.h34
-rw-r--r--test/core/end2end/fixtures/h2_census.cc39
-rw-r--r--test/core/end2end/fixtures/h2_compress.cc43
-rw-r--r--test/core/end2end/fixtures/h2_fakesec.cc48
-rw-r--r--test/core/end2end/fixtures/h2_fd.cc28
-rw-r--r--test/core/end2end/fixtures/h2_full+pipe.cc39
-rw-r--r--test/core/end2end/fixtures/h2_full+trace.cc37
-rw-r--r--test/core/end2end/fixtures/h2_full+workarounds.cc45
-rw-r--r--test/core/end2end/fixtures/h2_full.cc37
-rw-r--r--test/core/end2end/fixtures/h2_http_proxy.cc43
-rw-r--r--test/core/end2end/fixtures/h2_load_reporting.cc30
-rw-r--r--test/core/end2end/fixtures/h2_oauth2.cc98
-rw-r--r--test/core/end2end/fixtures/h2_proxy.cc49
-rw-r--r--test/core/end2end/fixtures/h2_sockpair+trace.cc42
-rw-r--r--test/core/end2end/fixtures/h2_sockpair.cc42
-rw-r--r--test/core/end2end/fixtures/h2_sockpair_1byte.cc48
-rw-r--r--test/core/end2end/fixtures/h2_ssl.cc58
-rw-r--r--test/core/end2end/fixtures/h2_ssl_proxy.cc80
-rw-r--r--test/core/end2end/fixtures/h2_uds.cc37
-rw-r--r--test/core/end2end/fixtures/inproc.cc19
-rw-r--r--test/core/end2end/fixtures/proxy.cc120
-rw-r--r--test/core/end2end/fixtures/proxy.h20
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.cc348
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer.cc24
-rw-r--r--test/core/end2end/fuzzers/server_fuzzer.cc22
-rw-r--r--test/core/end2end/goaway_server_test.cc83
-rw-r--r--test/core/end2end/h2_ssl_cert_test.cc92
-rw-r--r--test/core/end2end/invalid_call_argument_test.cc68
-rw-r--r--test/core/end2end/multiple_server_queues_test.cc10
-rw-r--r--test/core/end2end/no_server_test.cc14
-rw-r--r--test/core/end2end/tests/authority_not_supported.cc26
-rw-r--r--test/core/end2end/tests/bad_hostname.cc22
-rw-r--r--test/core/end2end/tests/bad_ping.cc30
-rw-r--r--test/core/end2end/tests/binary_metadata.cc32
-rw-r--r--test/core/end2end/tests/call_creds.cc54
-rw-r--r--test/core/end2end/tests/cancel_after_accept.cc41
-rw-r--r--test/core/end2end/tests/cancel_after_client_done.cc32
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.cc26
-rw-r--r--test/core/end2end/tests/cancel_after_round_trip.cc40
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.cc26
-rw-r--r--test/core/end2end/tests/cancel_in_a_vacuum.cc20
-rw-r--r--test/core/end2end/tests/cancel_test_helpers.h8
-rw-r--r--test/core/end2end/tests/cancel_with_status.cc26
-rw-r--r--test/core/end2end/tests/compressed_payload.cc64
-rw-r--r--test/core/end2end/tests/connectivity.cc16
-rw-r--r--test/core/end2end/tests/default_host.cc26
-rw-r--r--test/core/end2end/tests/disappearing_server.cc22
-rw-r--r--test/core/end2end/tests/empty_batch.cc22
-rw-r--r--test/core/end2end/tests/filter_call_init_fails.cc90
-rw-r--r--test/core/end2end/tests/filter_causes_close.cc76
-rw-r--r--test/core/end2end/tests/filter_latency.cc74
-rw-r--r--test/core/end2end/tests/graceful_server_shutdown.cc24
-rw-r--r--test/core/end2end/tests/high_initial_seqno.cc28
-rw-r--r--test/core/end2end/tests/hpack_size.cc34
-rw-r--r--test/core/end2end/tests/idempotent_request.cc26
-rw-r--r--test/core/end2end/tests/invoke_large_request.cc38
-rw-r--r--test/core/end2end/tests/keepalive_timeout.cc39
-rw-r--r--test/core/end2end/tests/large_metadata.cc30
-rw-r--r--test/core/end2end/tests/load_reporting_hook.cc52
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.cc64
-rw-r--r--test/core/end2end/tests/max_connection_age.cc38
-rw-r--r--test/core/end2end/tests/max_connection_idle.cc24
-rw-r--r--test/core/end2end/tests/max_message_length.cc70
-rw-r--r--test/core/end2end/tests/negative_deadline.cc22
-rw-r--r--test/core/end2end/tests/network_status_change.cc28
-rw-r--r--test/core/end2end/tests/no_logging.cc36
-rw-r--r--test/core/end2end/tests/no_op.cc16
-rw-r--r--test/core/end2end/tests/payload.cc36
-rw-r--r--test/core/end2end/tests/ping.cc14
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.cc32
-rw-r--r--test/core/end2end/tests/proxy_auth.cc30
-rw-r--r--test/core/end2end/tests/registered_call.cc30
-rw-r--r--test/core/end2end/tests/request_with_flags.cc28
-rw-r--r--test/core/end2end/tests/request_with_payload.cc28
-rw-r--r--test/core/end2end/tests/resource_quota_server.cc66
-rw-r--r--test/core/end2end/tests/server_finishes_request.cc24
-rw-r--r--test/core/end2end/tests/shutdown_finishes_calls.cc22
-rw-r--r--test/core/end2end/tests/shutdown_finishes_tags.cc18
-rw-r--r--test/core/end2end/tests/simple_cacheable_request.cc32
-rw-r--r--test/core/end2end/tests/simple_delayed_request.cc28
-rw-r--r--test/core/end2end/tests/simple_metadata.cc32
-rw-r--r--test/core/end2end/tests/simple_request.cc36
-rw-r--r--test/core/end2end/tests/stream_compression_compressed_payload.cc64
-rw-r--r--test/core/end2end/tests/stream_compression_payload.cc41
-rw-r--r--test/core/end2end/tests/stream_compression_ping_pong_streaming.cc36
-rw-r--r--test/core/end2end/tests/streaming_error_response.cc32
-rw-r--r--test/core/end2end/tests/trailing_metadata.cc32
-rw-r--r--test/core/end2end/tests/workaround_cronet_compression.cc54
-rw-r--r--test/core/end2end/tests/write_buffering.cc32
-rw-r--r--test/core/end2end/tests/write_buffering_at_end.cc30
101 files changed, 2078 insertions, 2054 deletions
diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc
index 2070fa5b02..ea7857d8d7 100644
--- a/test/core/end2end/bad_server_response_test.cc
+++ b/test/core/end2end/bad_server_response_test.cc
@@ -70,17 +70,17 @@
#define SERVER_INCOMING_DATA_LENGTH_LOWER_THRESHOLD (size_t)200
struct rpc_state {
- char *target;
- grpc_completion_queue *cq;
- grpc_channel *channel;
- grpc_call *call;
+ char* target;
+ grpc_completion_queue* cq;
+ grpc_channel* channel;
+ grpc_call* call;
size_t incoming_data_length;
grpc_slice_buffer temp_incoming_buffer;
grpc_slice_buffer outgoing_buffer;
- grpc_endpoint *tcp;
+ grpc_endpoint* tcp;
gpr_atm done_atm;
bool write_done;
- const char *response_payload;
+ const char* response_payload;
size_t response_payload_length;
};
@@ -89,15 +89,15 @@ static struct rpc_state state;
static grpc_closure on_read;
static grpc_closure on_write;
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
-static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
+static void done_write(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
GPR_ASSERT(error == GRPC_ERROR_NONE);
gpr_atm_rel_store(&state.done_atm, 1);
}
-static void handle_write(grpc_exec_ctx *exec_ctx) {
+static void handle_write(grpc_exec_ctx* exec_ctx) {
grpc_slice slice = grpc_slice_from_copied_buffer(
state.response_payload, state.response_payload_length);
@@ -106,13 +106,13 @@ static void handle_write(grpc_exec_ctx *exec_ctx) {
grpc_endpoint_write(exec_ctx, state.tcp, &state.outgoing_buffer, &on_write);
}
-static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
+static void handle_read(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
GPR_ASSERT(error == GRPC_ERROR_NONE);
state.incoming_data_length += state.temp_incoming_buffer.length;
size_t i;
for (i = 0; i < state.temp_incoming_buffer.count; i++) {
- char *dump = grpc_dump_slice(state.temp_incoming_buffer.slices[i],
+ char* dump = grpc_dump_slice(state.temp_incoming_buffer.slices[i],
GPR_DUMP_HEX | GPR_DUMP_ASCII);
gpr_log(GPR_DEBUG, "Server received: %s", dump);
gpr_free(dump);
@@ -130,11 +130,11 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
}
}
-static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp,
- grpc_pollset *accepting_pollset,
- grpc_tcp_server_acceptor *acceptor) {
+static void on_connect(grpc_exec_ctx* exec_ctx, void* arg, grpc_endpoint* tcp,
+ grpc_pollset* accepting_pollset,
+ grpc_tcp_server_acceptor* acceptor) {
gpr_free(acceptor);
- test_tcp_server *server = (test_tcp_server *)arg;
+ test_tcp_server* server = (test_tcp_server*)arg;
GRPC_CLOSURE_INIT(&on_read, handle_read, NULL, grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_INIT(&on_write, done_write, NULL, grpc_schedule_on_exec_ctx);
grpc_slice_buffer_init(&state.temp_incoming_buffer);
@@ -151,14 +151,14 @@ static gpr_timespec n_sec_deadline(int seconds) {
}
static void start_rpc(int target_port, grpc_status_code expected_status,
- const char *expected_detail) {
+ const char* expected_detail) {
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_status_code status;
grpc_call_error error;
- cq_verifier *cqv;
+ cq_verifier* cqv;
grpc_slice details;
state.cq = grpc_completion_queue_create_for_next(NULL);
@@ -217,7 +217,7 @@ static void start_rpc(int target_port, grpc_status_code expected_status,
cq_verifier_destroy(cqv);
}
-static void cleanup_rpc(grpc_exec_ctx *exec_ctx) {
+static void cleanup_rpc(grpc_exec_ctx* exec_ctx) {
grpc_event ev;
grpc_slice_buffer_destroy_internal(exec_ctx, &state.temp_incoming_buffer);
grpc_slice_buffer_destroy_internal(exec_ctx, &state.outgoing_buffer);
@@ -232,12 +232,12 @@ static void cleanup_rpc(grpc_exec_ctx *exec_ctx) {
}
typedef struct {
- test_tcp_server *server;
- gpr_event *signal_when_done;
+ test_tcp_server* server;
+ gpr_event* signal_when_done;
} poll_args;
-static void actually_poll_server(void *arg) {
- poll_args *pa = (poll_args *)arg;
+static void actually_poll_server(void* arg) {
+ poll_args* pa = (poll_args*)arg;
gpr_timespec deadline = n_sec_deadline(10);
while (true) {
bool done = gpr_atm_acq_load(&state.done_atm) != 0;
@@ -250,25 +250,25 @@ static void actually_poll_server(void *arg) {
}
test_tcp_server_poll(pa->server, 1);
}
- gpr_event_set(pa->signal_when_done, (void *)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) {
+static void poll_server_until_read_done(test_tcp_server* server,
+ gpr_event* signal_when_done) {
gpr_atm_rel_store(&state.done_atm, 0);
state.write_done = 0;
gpr_thd_id id;
- poll_args *pa = (poll_args *)gpr_malloc(sizeof(*pa));
+ poll_args* pa = (poll_args*)gpr_malloc(sizeof(*pa));
pa->server = server;
pa->signal_when_done = signal_when_done;
gpr_thd_new(&id, actually_poll_server, pa, NULL);
}
-static void run_test(const char *response_payload,
+static void run_test(const char* response_payload,
size_t response_payload_length,
grpc_status_code expected_status,
- const char *expected_detail) {
+ const char* expected_detail) {
test_tcp_server test_server;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_event ev;
@@ -297,7 +297,7 @@ static void run_test(const char *response_payload,
grpc_shutdown();
}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
grpc_test_init(argc, argv);
/* status defined in hpack static table */
diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc
index b295682ce8..cea06ae282 100644
--- a/test/core/end2end/connection_refused_test.cc
+++ b/test/core/end2end/connection_refused_test.cc
@@ -33,15 +33,15 @@
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
-static void *tag(intptr_t i) { return (void *)i; }
+static void* tag(intptr_t i) { return (void*)i; }
static void run_test(bool wait_for_ready, bool use_service_config) {
- grpc_channel *chan;
- grpc_call *call;
- grpc_completion_queue *cq;
- cq_verifier *cqv;
+ grpc_channel* chan;
+ grpc_call* call;
+ grpc_completion_queue* cq;
+ cq_verifier* cqv;
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_metadata_array trailing_metadata_recv;
grpc_status_code status;
grpc_slice details;
@@ -57,13 +57,13 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
cqv = cq_verifier_create(cq);
/* if using service config, create channel args */
- grpc_channel_args *args = NULL;
+ grpc_channel_args* args = NULL;
if (use_service_config) {
GPR_ASSERT(wait_for_ready);
grpc_arg arg;
arg.type = GRPC_ARG_STRING;
- arg.key = const_cast<char *>(GRPC_ARG_SERVICE_CONFIG);
- arg.value.string = const_cast<char *>(
+ arg.key = const_cast<char*>(GRPC_ARG_SERVICE_CONFIG);
+ arg.value.string = const_cast<char*>(
"{\n"
" \"methodConfig\": [ {\n"
" \"name\": [\n"
@@ -77,7 +77,7 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
/* create a call, channel to a port which will refuse connection */
int port = grpc_pick_unused_port_or_die();
- char *addr;
+ char* addr;
gpr_join_host_port(&addr, "127.0.0.1", port);
gpr_log(GPR_INFO, "server: %s", addr);
chan = grpc_insecure_channel_create(addr, args, NULL);
@@ -139,7 +139,7 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
grpc_shutdown();
}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
grpc_test_init(argc, argv);
run_test(false /* wait_for_ready */, false /* use_service_config */);
run_test(true /* wait_for_ready */, false /* use_service_config */);
diff --git a/test/core/end2end/cq_verifier.cc b/test/core/end2end/cq_verifier.cc
index bb978923b2..fd5193f42c 100644
--- a/test/core/end2end/cq_verifier.cc
+++ b/test/core/end2end/cq_verifier.cc
@@ -38,43 +38,43 @@
typedef struct metadata {
size_t count;
size_t cap;
- char **keys;
- char **values;
+ char** keys;
+ char** values;
} metadata;
/* details what we expect to find on a single event - and forms a linked
list to detail other expectations */
typedef struct expectation {
- struct expectation *next;
- const char *file;
+ struct expectation* next;
+ const char* file;
int line;
grpc_completion_type type;
- void *tag;
+ void* tag;
int success;
} expectation;
/* the verifier itself */
struct cq_verifier {
/* bound completion queue */
- grpc_completion_queue *cq;
+ grpc_completion_queue* cq;
/* start of expectation list */
- expectation *first_expectation;
+ expectation* first_expectation;
};
-cq_verifier *cq_verifier_create(grpc_completion_queue *cq) {
- cq_verifier *v = (cq_verifier *)gpr_malloc(sizeof(cq_verifier));
+cq_verifier* cq_verifier_create(grpc_completion_queue* cq) {
+ cq_verifier* v = (cq_verifier*)gpr_malloc(sizeof(cq_verifier));
v->cq = cq;
v->first_expectation = NULL;
return v;
}
-void cq_verifier_destroy(cq_verifier *v) {
+void cq_verifier_destroy(cq_verifier* v) {
cq_verify(v);
gpr_free(v);
}
-static int has_metadata(const grpc_metadata *md, size_t count, const char *key,
- const char *value) {
+static int has_metadata(const grpc_metadata* md, size_t count, const char* key,
+ const char* value) {
size_t i;
for (i = 0; i < count; i++) {
if (0 == grpc_slice_str_cmp(md[i].key, key) &&
@@ -85,12 +85,12 @@ static int has_metadata(const grpc_metadata *md, size_t count, const char *key,
return 0;
}
-int contains_metadata(grpc_metadata_array *array, const char *key,
- const char *value) {
+int contains_metadata(grpc_metadata_array* array, const char* key,
+ const char* value) {
return has_metadata(array->metadata, array->count, key, value);
}
-static int has_metadata_slices(const grpc_metadata *md, size_t count,
+static int has_metadata_slices(const grpc_metadata* md, size_t count,
grpc_slice key, grpc_slice value) {
size_t i;
for (i = 0; i < count; i++) {
@@ -101,15 +101,15 @@ static int has_metadata_slices(const grpc_metadata *md, size_t count,
return 0;
}
-int contains_metadata_slices(grpc_metadata_array *array, grpc_slice key,
+int contains_metadata_slices(grpc_metadata_array* array, grpc_slice key,
grpc_slice value) {
return has_metadata_slices(array->metadata, array->count, key, value);
}
-static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) {
+static grpc_slice merge_slices(grpc_slice* slices, size_t nslices) {
size_t i;
size_t len = 0;
- uint8_t *cursor;
+ uint8_t* cursor;
grpc_slice out;
for (i = 0; i < nslices; i++) {
@@ -128,7 +128,7 @@ static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) {
return out;
}
-int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, grpc_slice b) {
+int raw_byte_buffer_eq_slice(grpc_byte_buffer* rbb, grpc_slice b) {
grpc_slice a;
int ok;
@@ -144,9 +144,9 @@ int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, grpc_slice b) {
return ok;
}
-int byte_buffer_eq_slice(grpc_byte_buffer *bb, grpc_slice b) {
+int byte_buffer_eq_slice(grpc_byte_buffer* bb, grpc_slice b) {
grpc_byte_buffer_reader reader;
- grpc_byte_buffer *rbb;
+ grpc_byte_buffer* rbb;
int res;
GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, bb) &&
@@ -159,9 +159,9 @@ int byte_buffer_eq_slice(grpc_byte_buffer *bb, grpc_slice b) {
return res;
}
-int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) {
+int byte_buffer_eq_string(grpc_byte_buffer* bb, const char* str) {
grpc_byte_buffer_reader reader;
- grpc_byte_buffer *rbb;
+ grpc_byte_buffer* rbb;
int res;
GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, bb) &&
@@ -174,10 +174,10 @@ int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) {
return res;
}
-static bool is_probably_integer(void *p) { return ((uintptr_t)p) < 1000000; }
+static bool is_probably_integer(void* p) { return ((uintptr_t)p) < 1000000; }
-static void expectation_to_strvec(gpr_strvec *buf, expectation *e) {
- char *tmp;
+static void expectation_to_strvec(gpr_strvec* buf, expectation* e) {
+ char* tmp;
if (is_probably_integer(e->tag)) {
gpr_asprintf(&tmp, "tag(%" PRIdPTR ") ", (intptr_t)e->tag);
@@ -200,8 +200,8 @@ static void expectation_to_strvec(gpr_strvec *buf, expectation *e) {
}
}
-static void expectations_to_strvec(gpr_strvec *buf, cq_verifier *v) {
- expectation *e;
+static void expectations_to_strvec(gpr_strvec* buf, cq_verifier* v) {
+ expectation* e;
for (e = v->first_expectation; e != NULL; e = e->next) {
expectation_to_strvec(buf, e);
@@ -209,9 +209,9 @@ static void expectations_to_strvec(gpr_strvec *buf, cq_verifier *v) {
}
}
-static void fail_no_event_received(cq_verifier *v) {
+static void fail_no_event_received(cq_verifier* v) {
gpr_strvec buf;
- char *msg;
+ char* msg;
gpr_strvec_init(&buf);
gpr_strvec_add(&buf, gpr_strdup("no event received, but expected:\n"));
expectations_to_strvec(&buf, v);
@@ -222,7 +222,7 @@ static void fail_no_event_received(cq_verifier *v) {
abort();
}
-static void verify_matches(expectation *e, grpc_event *ev) {
+static void verify_matches(expectation* e, grpc_event* ev) {
GPR_ASSERT(e->type == ev->type);
switch (e->type) {
case GRPC_OP_COMPLETE:
@@ -230,7 +230,7 @@ static void verify_matches(expectation *e, grpc_event *ev) {
gpr_strvec expected;
gpr_strvec_init(&expected);
expectation_to_strvec(&expected, e);
- char *s = gpr_strvec_flatten(&expected, NULL);
+ char* s = gpr_strvec_flatten(&expected, NULL);
gpr_strvec_destroy(&expected);
gpr_log(GPR_ERROR, "actual success does not match expected: %s", s);
gpr_free(s);
@@ -248,7 +248,7 @@ static void verify_matches(expectation *e, grpc_event *ev) {
}
}
-void cq_verify(cq_verifier *v) {
+void cq_verify(cq_verifier* v) {
const gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
while (v->first_expectation != NULL) {
grpc_event ev = grpc_completion_queue_next(v->cq, deadline, NULL);
@@ -256,8 +256,8 @@ void cq_verify(cq_verifier *v) {
fail_no_event_received(v);
break;
}
- expectation *e;
- expectation *prev = NULL;
+ expectation* e;
+ expectation* prev = NULL;
for (e = v->first_expectation; e != NULL; e = e->next) {
if (e->tag == ev.tag) {
verify_matches(e, &ev);
@@ -269,7 +269,7 @@ void cq_verify(cq_verifier *v) {
prev = e;
}
if (e == NULL) {
- char *s = grpc_event_string(&ev);
+ char* s = grpc_event_string(&ev);
gpr_log(GPR_ERROR, "cq returned unexpected event: %s", s);
gpr_free(s);
gpr_strvec expectations;
@@ -284,7 +284,7 @@ void cq_verify(cq_verifier *v) {
}
}
-void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) {
+void cq_verify_empty_timeout(cq_verifier* v, int timeout_sec) {
gpr_timespec deadline =
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_seconds(timeout_sec, GPR_TIMESPAN));
@@ -294,18 +294,18 @@ void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) {
ev = grpc_completion_queue_next(v->cq, deadline, NULL);
if (ev.type != GRPC_QUEUE_TIMEOUT) {
- char *s = grpc_event_string(&ev);
+ char* s = grpc_event_string(&ev);
gpr_log(GPR_ERROR, "unexpected event (expected nothing): %s", s);
gpr_free(s);
abort();
}
}
-void cq_verify_empty(cq_verifier *v) { cq_verify_empty_timeout(v, 1); }
+void cq_verify_empty(cq_verifier* v) { cq_verify_empty_timeout(v, 1); }
-static void add(cq_verifier *v, const char *file, int line,
- grpc_completion_type type, void *tag, bool success) {
- expectation *e = (expectation *)gpr_malloc(sizeof(expectation));
+static void add(cq_verifier* v, const char* file, int line,
+ grpc_completion_type type, void* tag, bool success) {
+ expectation* e = (expectation*)gpr_malloc(sizeof(expectation));
e->type = type;
e->file = file;
e->line = line;
@@ -315,7 +315,7 @@ static void add(cq_verifier *v, const char *file, int line,
v->first_expectation = e;
}
-void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag,
+void cq_expect_completion(cq_verifier* v, const char* file, int line, void* tag,
bool success) {
add(v, file, line, GRPC_OP_COMPLETE, tag, success);
}
diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h
index d8a5d491d8..0b3b3fb349 100644
--- a/test/core/end2end/cq_verifier.h
+++ b/test/core/end2end/cq_verifier.h
@@ -34,33 +34,33 @@ extern "C" {
typedef struct cq_verifier cq_verifier;
/* construct/destroy a cq_verifier */
-cq_verifier *cq_verifier_create(grpc_completion_queue *cq);
-void cq_verifier_destroy(cq_verifier *v);
+cq_verifier* cq_verifier_create(grpc_completion_queue* cq);
+void cq_verifier_destroy(cq_verifier* v);
/* ensure all expected events (and only those events) are present on the
bound completion queue */
-void cq_verify(cq_verifier *v);
+void cq_verify(cq_verifier* v);
/* ensure that the completion queue is empty */
-void cq_verify_empty(cq_verifier *v);
+void cq_verify_empty(cq_verifier* v);
/* ensure that the completion queue is empty, waiting up to \a timeout secs. */
-void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec);
+void cq_verify_empty_timeout(cq_verifier* v, int timeout_sec);
/* Various expectation matchers
Any functions taking ... expect a NULL terminated list of key/value pairs
(each pair using two parameter slots) of metadata that MUST be present in
the event. */
-void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag,
+void cq_expect_completion(cq_verifier* v, const char* file, int line, void* tag,
bool success);
#define CQ_EXPECT_COMPLETION(v, tag, success) \
cq_expect_completion(v, __FILE__, __LINE__, tag, success)
-int byte_buffer_eq_slice(grpc_byte_buffer *bb, grpc_slice b);
-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_slices(grpc_metadata_array *array, grpc_slice key,
+int byte_buffer_eq_slice(grpc_byte_buffer* bb, grpc_slice b);
+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_slices(grpc_metadata_array* array, grpc_slice key,
grpc_slice value);
#ifdef __cplusplus
diff --git a/test/core/end2end/cq_verifier_internal.h b/test/core/end2end/cq_verifier_internal.h
index 0aa8dc6b1c..0629e0e5a7 100644
--- a/test/core/end2end/cq_verifier_internal.h
+++ b/test/core/end2end/cq_verifier_internal.h
@@ -23,10 +23,10 @@
typedef struct expectation expectation;
-expectation *cq_verifier_get_first_expectation(cq_verifier *v);
+expectation* cq_verifier_get_first_expectation(cq_verifier* v);
-void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e);
+void cq_verifier_set_first_expectation(cq_verifier* v, expectation* e);
-grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds);
+grpc_event cq_verifier_next_event(cq_verifier* v, int timeout_seconds);
#endif /* GRPC_TEST_CORE_END2END_CQ_VERIFIER_INTERNAL_H */
diff --git a/test/core/end2end/cq_verifier_native.cc b/test/core/end2end/cq_verifier_native.cc
index 2bd9401aba..a0a7c832e5 100644
--- a/test/core/end2end/cq_verifier_native.cc
+++ b/test/core/end2end/cq_verifier_native.cc
@@ -24,33 +24,33 @@
/* the verifier itself */
struct cq_verifier {
/* bound completion queue */
- grpc_completion_queue *cq;
+ grpc_completion_queue* cq;
/* start of expectation list */
- expectation *first_expectation;
+ expectation* first_expectation;
uv_timer_t timer;
};
-cq_verifier *cq_verifier_create(grpc_completion_queue *cq) {
- cq_verifier *v = static_cast<cq_verifier *>(gpr_malloc(sizeof(cq_verifier)));
+cq_verifier* cq_verifier_create(grpc_completion_queue* cq) {
+ cq_verifier* v = static_cast<cq_verifier*>(gpr_malloc(sizeof(cq_verifier)));
v->cq = cq;
cq_verifier_set_first_expectation(v, NULL);
return v;
}
-void cq_verifier_destroy(cq_verifier *v) {
+void cq_verifier_destroy(cq_verifier* v) {
cq_verify(v);
gpr_free(v);
}
-expectation *cq_verifier_get_first_expectation(cq_verifier *v) {
+expectation* cq_verifier_get_first_expectation(cq_verifier* v) {
return v->first_expectation;
}
-void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) {
+void cq_verifier_set_first_expectation(cq_verifier* v, expectation* e) {
v->first_expectation = e;
}
-grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) {
+grpc_event cq_verifier_next_event(cq_verifier* v, int timeout_seconds) {
const gpr_timespec deadline =
grpc_timeout_seconds_to_deadline(timeout_seconds);
return grpc_completion_queue_next(v->cq, deadline, NULL);
diff --git a/test/core/end2end/cq_verifier_uv.cc b/test/core/end2end/cq_verifier_uv.cc
index 79e686c8f6..e23b3ae2a0 100644
--- a/test/core/end2end/cq_verifier_uv.cc
+++ b/test/core/end2end/cq_verifier_uv.cc
@@ -36,51 +36,51 @@ typedef enum timer_state {
/* the verifier itself */
struct cq_verifier {
/* bound completion queue */
- grpc_completion_queue *cq;
+ grpc_completion_queue* cq;
/* start of expectation list */
- expectation *first_expectation;
+ expectation* first_expectation;
uv_timer_t timer;
};
-cq_verifier *cq_verifier_create(grpc_completion_queue *cq) {
- cq_verifier *v = static_cast<cq_verifier *>(gpr_malloc(sizeof(cq_verifier)));
+cq_verifier* cq_verifier_create(grpc_completion_queue* cq) {
+ cq_verifier* v = static_cast<cq_verifier*>(gpr_malloc(sizeof(cq_verifier)));
v->cq = cq;
v->first_expectation = NULL;
uv_timer_init(uv_default_loop(), &v->timer);
- v->timer.data = (void *)TIMER_STARTED;
+ v->timer.data = (void*)TIMER_STARTED;
return v;
}
-static void timer_close_cb(uv_handle_t *handle) {
- handle->data = (void *)TIMER_CLOSED;
+static void timer_close_cb(uv_handle_t* handle) {
+ handle->data = (void*)TIMER_CLOSED;
}
-void cq_verifier_destroy(cq_verifier *v) {
+void cq_verifier_destroy(cq_verifier* v) {
cq_verify(v);
- uv_close((uv_handle_t *)&v->timer, timer_close_cb);
+ uv_close((uv_handle_t*)&v->timer, timer_close_cb);
while (reinterpret_cast<timer_state>(v->timer.data) != TIMER_CLOSED) {
uv_run(uv_default_loop(), UV_RUN_NOWAIT);
}
gpr_free(v);
}
-expectation *cq_verifier_get_first_expectation(cq_verifier *v) {
+expectation* cq_verifier_get_first_expectation(cq_verifier* v) {
return v->first_expectation;
}
-void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) {
+void cq_verifier_set_first_expectation(cq_verifier* v, expectation* e) {
v->first_expectation = e;
}
-static void timer_run_cb(uv_timer_t *timer) {
- timer->data = (void *)TIMER_TRIGGERED;
+static void timer_run_cb(uv_timer_t* timer) {
+ timer->data = (void*)TIMER_TRIGGERED;
}
-grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) {
+grpc_event cq_verifier_next_event(cq_verifier* v, int timeout_seconds) {
uint64_t timeout_ms =
timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000;
grpc_event ev;
- v->timer.data = (void *)TIMER_STARTED;
+ v->timer.data = (void*)TIMER_STARTED;
uv_timer_start(&v->timer, timer_run_cb, timeout_ms, 0);
ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC),
NULL);
diff --git a/test/core/end2end/dualstack_socket_test.cc b/test/core/end2end/dualstack_socket_test.cc
index bfb2e227ac..1e02116e4c 100644
--- a/test/core/end2end/dualstack_socket_test.cc
+++ b/test/core/end2end/dualstack_socket_test.cc
@@ -39,36 +39,36 @@
/* This test exercises IPv4, IPv6, and dualstack sockets in various ways. */
-static void *tag(intptr_t i) { return (void *)i; }
+static void* tag(intptr_t i) { return (void*)i; }
static gpr_timespec ms_from_now(int ms) {
return grpc_timeout_milliseconds_to_deadline(ms);
}
-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, ms_from_now(5000), NULL);
} while (ev.type != GRPC_QUEUE_SHUTDOWN);
}
-static void do_nothing(void *ignored) {}
+static void do_nothing(void* ignored) {}
-void test_connect(const char *server_host, const char *client_host, int port,
+void test_connect(const char* server_host, const char* client_host, int port,
int expect_ok) {
- char *client_hostport;
- char *server_hostport;
- grpc_channel *client;
- grpc_server *server;
- grpc_completion_queue *cq;
- grpc_completion_queue *shutdown_cq;
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv;
+ char* client_hostport;
+ char* server_hostport;
+ grpc_channel* client;
+ grpc_server* server;
+ grpc_completion_queue* cq;
+ grpc_completion_queue* shutdown_cq;
+ grpc_call* c;
+ grpc_call* s;
+ cq_verifier* cqv;
gpr_timespec deadline;
int got_port;
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;
@@ -77,7 +77,7 @@ void test_connect(const char *server_host, const char *client_host, int port,
grpc_slice details;
int was_cancelled = 2;
grpc_call_details call_details;
- char *peer;
+ char* peer;
int picked_port = 0;
if (port == 0) {
@@ -112,20 +112,20 @@ void test_connect(const char *server_host, const char *client_host, int port,
size_t i;
grpc_slice uri_slice;
grpc_slice_buffer uri_parts;
- char **hosts_with_port;
+ char** hosts_with_port;
uri_slice =
- grpc_slice_new((char *)client_host, strlen(client_host), do_nothing);
+ grpc_slice_new((char*)client_host, strlen(client_host), do_nothing);
grpc_slice_buffer_init(&uri_parts);
grpc_slice_split(uri_slice, ",", &uri_parts);
hosts_with_port =
- static_cast<char **>(gpr_malloc(sizeof(char *) * uri_parts.count));
+ static_cast<char**>(gpr_malloc(sizeof(char*) * uri_parts.count));
for (i = 0; i < uri_parts.count; i++) {
- char *uri_part_str = grpc_slice_to_c_string(uri_parts.slices[i]);
+ char* uri_part_str = grpc_slice_to_c_string(uri_parts.slices[i]);
gpr_asprintf(&hosts_with_port[i], "%s:%d", uri_part_str, port);
gpr_free(uri_part_str);
}
- client_hostport = gpr_strjoin_sep((const char **)hosts_with_port,
+ client_hostport = gpr_strjoin_sep((const char**)hosts_with_port,
uri_parts.count, ",", NULL);
for (i = 0; i < uri_parts.count; i++) {
gpr_free(hosts_with_port[i]);
@@ -269,9 +269,9 @@ void test_connect(const char *server_host, const char *client_host, int port,
}
}
-int external_dns_works(const char *host) {
- grpc_resolved_addresses *res = NULL;
- grpc_error *error = grpc_blocking_resolve_address(host, "80", &res);
+int external_dns_works(const char* host) {
+ grpc_resolved_addresses* res = NULL;
+ grpc_error* error = grpc_blocking_resolve_address(host, "80", &res);
GRPC_ERROR_UNREF(error);
if (res != NULL) {
grpc_resolved_addresses_destroy(res);
@@ -280,7 +280,7 @@ int external_dns_works(const char *host) {
return 0;
}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
int do_ipv6 = 1;
grpc_test_init(argc, argv);
@@ -353,6 +353,6 @@ int main(int argc, char **argv) {
#else /* GRPC_POSIX_SOCKET */
-int main(int argc, char **argv) { return 1; }
+int main(int argc, char** argv) { return 1; }
#endif /* GRPC_POSIX_SOCKET */
diff --git a/test/core/end2end/end2end_nosec_tests.cc b/test/core/end2end/end2end_nosec_tests.cc
index 3236feea56..ca63864a9e 100644
--- a/test/core/end2end/end2end_nosec_tests.cc
+++ b/test/core/end2end/end2end_nosec_tests.cc
@@ -130,11 +130,13 @@ extern void simple_metadata(grpc_end2end_test_config config);
extern void simple_metadata_pre_init(void);
extern void simple_request(grpc_end2end_test_config config);
extern void simple_request_pre_init(void);
-extern void stream_compression_compressed_payload(grpc_end2end_test_config config);
+extern void stream_compression_compressed_payload(
+ grpc_end2end_test_config config);
extern void stream_compression_compressed_payload_pre_init(void);
extern void stream_compression_payload(grpc_end2end_test_config config);
extern void stream_compression_payload_pre_init(void);
-extern void stream_compression_ping_pong_streaming(grpc_end2end_test_config config);
+extern void stream_compression_ping_pong_streaming(
+ grpc_end2end_test_config config);
extern void stream_compression_ping_pong_streaming_pre_init(void);
extern void streaming_error_response(grpc_end2end_test_config config);
extern void streaming_error_response_pre_init(void);
@@ -211,7 +213,7 @@ void grpc_end2end_tests_pre_init(void) {
write_buffering_at_end_pre_init();
}
-void grpc_end2end_tests(int argc, char **argv,
+void grpc_end2end_tests(int argc, char** argv,
grpc_end2end_test_config config) {
int i;
diff --git a/test/core/end2end/end2end_test_utils.cc b/test/core/end2end/end2end_test_utils.cc
index c1f119548a..35f086a7f6 100644
--- a/test/core/end2end/end2end_test_utils.cc
+++ b/test/core/end2end/end2end_test_utils.cc
@@ -22,7 +22,7 @@
#include <grpc/support/log.h>
-const char *get_host_override_string(const char *str,
+const char* get_host_override_string(const char* str,
grpc_end2end_test_config config) {
if (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER) {
return str;
@@ -31,9 +31,9 @@ const char *get_host_override_string(const char *str,
}
}
-const grpc_slice *get_host_override_slice(const char *str,
+const grpc_slice* get_host_override_slice(const char* str,
grpc_end2end_test_config config) {
- const char *r = get_host_override_string(str, config);
+ const char* r = get_host_override_string(str, config);
if (r != NULL) {
static grpc_slice ret;
ret = grpc_slice_from_static_string(r);
@@ -42,7 +42,7 @@ const grpc_slice *get_host_override_slice(const char *str,
return NULL;
}
-void validate_host_override_string(const char *pattern, grpc_slice str,
+void validate_host_override_string(const char* pattern, grpc_slice str,
grpc_end2end_test_config config) {
if (config.feature_mask & FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER) {
GPR_ASSERT(0 == grpc_slice_str_cmp(str, pattern));
diff --git a/test/core/end2end/end2end_tests.cc b/test/core/end2end/end2end_tests.cc
index ca9443b642..5920b532f1 100644
--- a/test/core/end2end/end2end_tests.cc
+++ b/test/core/end2end/end2end_tests.cc
@@ -132,11 +132,13 @@ extern void simple_metadata(grpc_end2end_test_config config);
extern void simple_metadata_pre_init(void);
extern void simple_request(grpc_end2end_test_config config);
extern void simple_request_pre_init(void);
-extern void stream_compression_compressed_payload(grpc_end2end_test_config config);
+extern void stream_compression_compressed_payload(
+ grpc_end2end_test_config config);
extern void stream_compression_compressed_payload_pre_init(void);
extern void stream_compression_payload(grpc_end2end_test_config config);
extern void stream_compression_payload_pre_init(void);
-extern void stream_compression_ping_pong_streaming(grpc_end2end_test_config config);
+extern void stream_compression_ping_pong_streaming(
+ grpc_end2end_test_config config);
extern void stream_compression_ping_pong_streaming_pre_init(void);
extern void streaming_error_response(grpc_end2end_test_config config);
extern void streaming_error_response_pre_init(void);
@@ -214,7 +216,7 @@ void grpc_end2end_tests_pre_init(void) {
write_buffering_at_end_pre_init();
}
-void grpc_end2end_tests(int argc, char **argv,
+void grpc_end2end_tests(int argc, char** argv,
grpc_end2end_test_config config) {
int i;
diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h
index 87269ec468..b42d90b55c 100644
--- a/test/core/end2end/end2end_tests.h
+++ b/test/core/end2end/end2end_tests.h
@@ -38,40 +38,40 @@ typedef struct grpc_end2end_test_config grpc_end2end_test_config;
#define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check"
struct grpc_end2end_test_fixture {
- grpc_completion_queue *cq;
- grpc_completion_queue *shutdown_cq;
- grpc_server *server;
- grpc_channel *client;
- void *fixture_data;
+ grpc_completion_queue* cq;
+ grpc_completion_queue* shutdown_cq;
+ grpc_server* server;
+ grpc_channel* client;
+ void* fixture_data;
};
struct grpc_end2end_test_config {
/* A descriptive name for this test fixture. */
- const char *name;
+ const char* name;
/* Which features are supported by this fixture. See feature flags above. */
uint32_t feature_mask;
- grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args *client_args,
- grpc_channel_args *server_args);
- void (*init_client)(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args);
- void (*init_server)(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args);
- void (*tear_down_data)(grpc_end2end_test_fixture *f);
+ grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args* client_args,
+ grpc_channel_args* server_args);
+ void (*init_client)(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args);
+ void (*init_server)(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args);
+ void (*tear_down_data)(grpc_end2end_test_fixture* f);
};
void grpc_end2end_tests_pre_init(void);
-void grpc_end2end_tests(int argc, char **argv, grpc_end2end_test_config config);
+void grpc_end2end_tests(int argc, char** argv, grpc_end2end_test_config config);
-const char *get_host_override_string(const char *str,
+const char* get_host_override_string(const char* str,
grpc_end2end_test_config config);
/* Returns a pointer to a statically allocated slice: future invocations
overwrite past invocations, not threadsafe, etc... */
-const grpc_slice *get_host_override_slice(const char *str,
+const grpc_slice* get_host_override_slice(const char* str,
grpc_end2end_test_config config);
-void validate_host_override_string(const char *pattern, grpc_slice str,
+void validate_host_override_string(const char* pattern, grpc_slice str,
grpc_end2end_test_config config);
#endif /* GRPC_TEST_CORE_END2END_END2END_TESTS_H */
diff --git a/test/core/end2end/fixtures/h2_census.cc b/test/core/end2end/fixtures/h2_census.cc
index d7058187b4..4213140f4a 100644
--- a/test/core/end2end/fixtures/h2_census.cc
+++ b/test/core/end2end/fixtures/h2_census.cc
@@ -37,14 +37,14 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -60,15 +60,15 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
static grpc_arg make_census_enable_arg(void) {
grpc_arg arg;
arg.type = GRPC_ARG_INTEGER;
- arg.key = const_cast<char *>(GRPC_ARG_ENABLE_CENSUS);
+ arg.key = const_cast<char*>(GRPC_ARG_ENABLE_CENSUS);
arg.value.integer = 1;
return arg;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
grpc_arg arg = make_census_enable_arg();
client_args = grpc_channel_args_copy_and_add(client_args, &arg, 1);
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
@@ -80,10 +80,10 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
}
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
grpc_arg arg = make_census_enable_arg();
if (f->server) {
grpc_server_destroy(f->server);
@@ -100,23 +100,24 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack+census", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack+census",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_compress.cc b/test/core/end2end/fixtures/h2_compress.cc
index bdfeef259d..64e028b950 100644
--- a/test/core/end2end/fixtures/h2_compress.cc
+++ b/test/core/end2end/fixtures/h2_compress.cc
@@ -37,17 +37,17 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_compression_fixture_data {
- char *localaddr;
- grpc_channel_args *client_args_compression;
- grpc_channel_args *server_args_compression;
+ char* localaddr;
+ grpc_channel_args* client_args_compression;
+ grpc_channel_args* server_args_compression;
} fullstack_compression_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_compression(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_compression_fixture_data *ffd =
- static_cast<fullstack_compression_fixture_data *>(
+ fullstack_compression_fixture_data* ffd =
+ static_cast<fullstack_compression_fixture_data*>(
gpr_malloc(sizeof(fullstack_compression_fixture_data)));
memset(ffd, 0, sizeof(fullstack_compression_fixture_data));
@@ -61,10 +61,10 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_compression(
return f;
}
-void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_compression_fixture_data *ffd =
- static_cast<fullstack_compression_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_compression_fixture_data* ffd =
+ static_cast<fullstack_compression_fixture_data*>(f->fixture_data);
if (ffd->client_args_compression != NULL) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_channel_args_destroy(&exec_ctx, ffd->client_args_compression);
@@ -76,10 +76,10 @@ void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture *f,
ffd->client_args_compression, NULL);
}
-void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_compression_fixture_data *ffd =
- static_cast<fullstack_compression_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_compression_fixture_data* ffd =
+ static_cast<fullstack_compression_fixture_data*>(f->fixture_data);
if (ffd->server_args_compression != NULL) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_channel_args_destroy(&exec_ctx, ffd->server_args_compression);
@@ -96,10 +96,10 @@ void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture *f) {
+void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture* f) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- fullstack_compression_fixture_data *ffd =
- static_cast<fullstack_compression_fixture_data *>(f->fixture_data);
+ fullstack_compression_fixture_data* ffd =
+ static_cast<fullstack_compression_fixture_data*>(f->fixture_data);
grpc_channel_args_destroy(&exec_ctx, ffd->client_args_compression);
grpc_channel_args_destroy(&exec_ctx, ffd->server_args_compression);
gpr_free(ffd->localaddr);
@@ -109,16 +109,17 @@ void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack_compression", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack_compression",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack_compression,
chttp2_init_client_fullstack_compression,
chttp2_init_server_fullstack_compression,
chttp2_tear_down_fullstack_compression},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_fakesec.cc b/test/core/end2end/fixtures/h2_fakesec.cc
index 7cbcfcca91..fbf2f49729 100644
--- a/test/core/end2end/fixtures/h2_fakesec.cc
+++ b/test/core/end2end/fixtures/h2_fakesec.cc
@@ -31,15 +31,15 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_secure_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_secure_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(
gpr_malloc(sizeof(fullstack_secure_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -52,19 +52,19 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f;
}
-static void process_auth_failure(void *state, grpc_auth_context *ctx,
- const grpc_metadata *md, size_t md_count,
+static void process_auth_failure(void* state, grpc_auth_context* ctx,
+ const grpc_metadata* md, size_t md_count,
grpc_process_auth_metadata_done_cb cb,
- void *user_data) {
+ void* user_data) {
GPR_ASSERT(state == NULL);
cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL);
}
static void chttp2_init_client_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- grpc_channel_credentials *creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args,
+ grpc_channel_credentials* creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
f->client =
grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client != NULL);
@@ -72,10 +72,10 @@ static void chttp2_init_client_secure_fullstack(
}
static void chttp2_init_server_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args,
- grpc_server_credentials *server_creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args,
+ grpc_server_credentials* server_creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -87,21 +87,21 @@ static void chttp2_init_server_secure_fullstack(
grpc_server_start(f->server);
}
-void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
static void chttp2_init_client_fake_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
- grpc_channel_credentials *fake_ts_creds =
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args) {
+ grpc_channel_credentials* fake_ts_creds =
grpc_fake_transport_security_credentials_create();
chttp2_init_client_secure_fullstack(f, client_args, fake_ts_creds);
}
-static int fail_server_auth_check(grpc_channel_args *server_args) {
+static int fail_server_auth_check(grpc_channel_args* server_args) {
size_t i;
if (server_args == NULL) return 0;
for (i = 0; i < server_args->num_args; i++) {
@@ -114,8 +114,8 @@ static int fail_server_auth_check(grpc_channel_args *server_args) {
}
static void chttp2_init_server_fake_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args) {
- grpc_server_credentials *fake_ts_creds =
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args) {
+ grpc_server_credentials* fake_ts_creds =
grpc_fake_transport_security_server_credentials_create();
if (fail_server_auth_check(server_args)) {
grpc_auth_metadata_processor processor = {process_auth_failure, NULL, NULL};
@@ -139,7 +139,7 @@ static grpc_end2end_test_config configs[] = {
chttp2_tear_down_secure_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
grpc_end2end_tests_pre_init();
diff --git a/test/core/end2end/fixtures/h2_fd.cc b/test/core/end2end/fixtures/h2_fd.cc
index 2dc7898d56..7005b969a0 100644
--- a/test/core/end2end/fixtures/h2_fd.cc
+++ b/test/core/end2end/fixtures/h2_fd.cc
@@ -35,7 +35,9 @@
#include "src/core/lib/iomgr/unix_sockets_posix.h"
#include "test/core/util/test_config.h"
-typedef struct { int fd_pair[2]; } sp_fixture_data;
+typedef struct {
+ int fd_pair[2];
+} sp_fixture_data;
static void create_sockets(int sv[2]) {
int flags;
@@ -49,9 +51,9 @@ static void create_sockets(int sv[2]) {
}
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
- sp_fixture_data *fixture_data =
- static_cast<sp_fixture_data *>(gpr_malloc(sizeof(*fixture_data)));
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
+ sp_fixture_data* fixture_data =
+ static_cast<sp_fixture_data*>(gpr_malloc(sizeof(*fixture_data)));
grpc_end2end_test_fixture f;
memset(&f, 0, sizeof(f));
@@ -64,10 +66,10 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
return f;
}
-static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
+static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- sp_fixture_data *sfd = static_cast<sp_fixture_data *>(f->fixture_data);
+ sp_fixture_data* sfd = static_cast<sp_fixture_data*>(f->fixture_data);
GPR_ASSERT(!f->client);
f->client = grpc_insecure_channel_create_from_fd(
@@ -77,10 +79,10 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
+static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- sp_fixture_data *sfd = static_cast<sp_fixture_data *>(f->fixture_data);
+ sp_fixture_data* sfd = static_cast<sp_fixture_data*>(f->fixture_data);
GPR_ASSERT(!f->server);
f->server = grpc_server_create(server_args, NULL);
GPR_ASSERT(f->server);
@@ -92,7 +94,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
+static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture* f) {
gpr_free(f->fixture_data);
}
@@ -103,7 +105,7 @@ static grpc_end2end_test_config configs[] = {
chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
@@ -121,6 +123,6 @@ int main(int argc, char **argv) {
#else /* GRPC_POSIX_SOCKET */
-int main(int argc, char **argv) { return 1; }
+int main(int argc, char** argv) { return 1; }
#endif /* GRPC_POSIX_SOCKET */
diff --git a/test/core/end2end/fixtures/h2_full+pipe.cc b/test/core/end2end/fixtures/h2_full+pipe.cc
index beff1be239..0dd650b8e0 100644
--- a/test/core/end2end/fixtures/h2_full+pipe.cc
+++ b/test/core/end2end/fixtures/h2_full+pipe.cc
@@ -42,14 +42,14 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -62,18 +62,18 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -83,23 +83,24 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_allow_specialized_wakeup_fd = 0;
@@ -119,6 +120,6 @@ int main(int argc, char **argv) {
#else /* GRPC_POSIX_WAKEUP_FD */
-int main(int argc, char **argv) { return 1; }
+int main(int argc, char** argv) { return 1; }
#endif /* GRPC_POSIX_WAKEUP_FD */
diff --git a/test/core/end2end/fixtures/h2_full+trace.cc b/test/core/end2end/fixtures/h2_full+trace.cc
index efed0c536f..21372c6dee 100644
--- a/test/core/end2end/fixtures/h2_full+trace.cc
+++ b/test/core/end2end/fixtures/h2_full+trace.cc
@@ -42,14 +42,14 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -62,18 +62,18 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -83,23 +83,24 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
/* force tracing on, with a value to force many
diff --git a/test/core/end2end/fixtures/h2_full+workarounds.cc b/test/core/end2end/fixtures/h2_full+workarounds.cc
index d4930ce90d..ebffe2125c 100644
--- a/test/core/end2end/fixtures/h2_full+workarounds.cc
+++ b/test/core/end2end/fixtures/h2_full+workarounds.cc
@@ -36,18 +36,18 @@
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
-static char *workarounds_arg[GRPC_MAX_WORKAROUND_ID] = {
- const_cast<char *>(GRPC_ARG_WORKAROUND_CRONET_COMPRESSION)};
+static char* workarounds_arg[GRPC_MAX_WORKAROUND_ID] = {
+ const_cast<char*>(GRPC_ARG_WORKAROUND_CRONET_COMPRESSION)};
typedef struct fullstack_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -60,27 +60,27 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
int i;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
grpc_arg args[GRPC_MAX_WORKAROUND_ID];
for (i = 0; i < GRPC_MAX_WORKAROUND_ID; i++) {
args[i].key = workarounds_arg[i];
args[i].type = GRPC_ARG_INTEGER;
args[i].value.integer = 1;
}
- grpc_channel_args *server_args_new =
+ grpc_channel_args* server_args_new =
grpc_channel_args_copy_and_add(server_args, args, GRPC_MAX_WORKAROUND_ID);
if (f->server) {
grpc_server_destroy(f->server);
@@ -93,24 +93,25 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER |
- FEATURE_MASK_SUPPORTS_WORKAROUNDS,
+ {"chttp2/fullstack",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER |
+ FEATURE_MASK_SUPPORTS_WORKAROUNDS,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_full.cc b/test/core/end2end/fixtures/h2_full.cc
index d132198157..895af67930 100644
--- a/test/core/end2end/fixtures/h2_full.cc
+++ b/test/core/end2end/fixtures/h2_full.cc
@@ -36,14 +36,14 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -56,18 +56,18 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -77,23 +77,24 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc
index 5630b491b0..a67ce82064 100644
--- a/test/core/end2end/fixtures/h2_http_proxy.cc
+++ b/test/core/end2end/fixtures/h2_http_proxy.cc
@@ -39,15 +39,15 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_fixture_data {
- char *server_addr;
- grpc_end2end_http_proxy *proxy;
+ char* server_addr;
+ grpc_end2end_http_proxy* proxy;
} fullstack_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
memset(&f, 0, sizeof(f));
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
const int server_port = grpc_pick_unused_port_or_die();
gpr_join_host_port(&ffd->server_addr, "localhost", server_port);
@@ -63,14 +63,14 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
- char *proxy_uri;
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
+ char* proxy_uri;
/* If testing for proxy auth, add credentials to proxy uri */
- const grpc_arg *proxy_auth_arg =
+ const grpc_arg* proxy_auth_arg =
grpc_channel_args_find(client_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS);
if (proxy_auth_arg == NULL || proxy_auth_arg->type != GRPC_ARG_STRING) {
gpr_asprintf(&proxy_uri, "http://%s",
@@ -85,10 +85,10 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
GPR_ASSERT(f->client);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -98,9 +98,9 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
gpr_free(ffd->server_addr);
grpc_end2end_http_proxy_destroy(ffd->proxy);
gpr_free(ffd);
@@ -108,14 +108,15 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_load_reporting.cc b/test/core/end2end/fixtures/h2_load_reporting.cc
index e461f13e06..b402fc5620 100644
--- a/test/core/end2end/fixtures/h2_load_reporting.cc
+++ b/test/core/end2end/fixtures/h2_load_reporting.cc
@@ -38,14 +38,14 @@
#include "test/core/util/test_config.h"
typedef struct load_reporting_fixture_data {
- char *localaddr;
+ char* localaddr;
} load_reporting_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_load_reporting(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- load_reporting_fixture_data *ffd = static_cast<load_reporting_fixture_data *>(
+ load_reporting_fixture_data* ffd = static_cast<load_reporting_fixture_data*>(
gpr_malloc(sizeof(load_reporting_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -58,18 +58,18 @@ static grpc_end2end_test_fixture chttp2_create_fixture_load_reporting(
return f;
}
-void chttp2_init_client_load_reporting(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- load_reporting_fixture_data *ffd =
- static_cast<load_reporting_fixture_data *>(f->fixture_data);
+void chttp2_init_client_load_reporting(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ load_reporting_fixture_data* ffd =
+ static_cast<load_reporting_fixture_data*>(f->fixture_data);
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client);
}
-void chttp2_init_server_load_reporting(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- load_reporting_fixture_data *ffd =
- static_cast<load_reporting_fixture_data *>(f->fixture_data);
+void chttp2_init_server_load_reporting(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ load_reporting_fixture_data* ffd =
+ static_cast<load_reporting_fixture_data*>(f->fixture_data);
grpc_arg arg = grpc_load_reporting_enable_arg();
if (f->server) {
grpc_server_destroy(f->server);
@@ -86,9 +86,9 @@ void chttp2_init_server_load_reporting(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_load_reporting(grpc_end2end_test_fixture *f) {
- load_reporting_fixture_data *ffd =
- static_cast<load_reporting_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_load_reporting(grpc_end2end_test_fixture* f) {
+ load_reporting_fixture_data* ffd =
+ static_cast<load_reporting_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
@@ -103,7 +103,7 @@ static grpc_end2end_test_config configs[] = {
chttp2_init_server_load_reporting, chttp2_tear_down_load_reporting},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_oauth2.cc b/test/core/end2end/fixtures/h2_oauth2.cc
index f1e49f20cd..88e590a15f 100644
--- a/test/core/end2end/fixtures/h2_oauth2.cc
+++ b/test/core/end2end/fixtures/h2_oauth2.cc
@@ -32,16 +32,16 @@
#include "test/core/util/test_config.h"
static const char oauth2_md[] = "Bearer aaslkfjs424535asdf";
-static const char *client_identity_property_name = "smurf_name";
-static const char *client_identity = "Brainy Smurf";
+static const char* client_identity_property_name = "smurf_name";
+static const char* client_identity = "Brainy Smurf";
typedef struct fullstack_secure_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_secure_fixture_data;
-static const grpc_metadata *find_metadata(const grpc_metadata *md,
- size_t md_count, const char *key,
- const char *value) {
+static const grpc_metadata* find_metadata(const grpc_metadata* md,
+ size_t md_count, const char* key,
+ const char* value) {
size_t i;
for (i = 0; i < md_count; i++) {
if (grpc_slice_str_cmp(md[i].key, key) == 0 &&
@@ -52,18 +52,20 @@ static const grpc_metadata *find_metadata(const grpc_metadata *md,
return NULL;
}
-typedef struct { size_t pseudo_refcount; } test_processor_state;
+typedef struct {
+ size_t pseudo_refcount;
+} test_processor_state;
-static void process_oauth2_success(void *state, grpc_auth_context *ctx,
- const grpc_metadata *md, size_t md_count,
+static void process_oauth2_success(void* state, grpc_auth_context* ctx,
+ const grpc_metadata* md, size_t md_count,
grpc_process_auth_metadata_done_cb cb,
- void *user_data) {
- const grpc_metadata *oauth2 =
+ void* user_data) {
+ const grpc_metadata* oauth2 =
find_metadata(md, md_count, "authorization", oauth2_md);
- test_processor_state *s;
+ test_processor_state* s;
GPR_ASSERT(state != NULL);
- s = (test_processor_state *)state;
+ s = (test_processor_state*)state;
GPR_ASSERT(s->pseudo_refcount == 1);
GPR_ASSERT(oauth2 != NULL);
grpc_auth_context_add_cstring_property(ctx, client_identity_property_name,
@@ -73,26 +75,26 @@ static void process_oauth2_success(void *state, grpc_auth_context *ctx,
cb(user_data, oauth2, 1, NULL, 0, GRPC_STATUS_OK, NULL);
}
-static void process_oauth2_failure(void *state, grpc_auth_context *ctx,
- const grpc_metadata *md, size_t md_count,
+static void process_oauth2_failure(void* state, grpc_auth_context* ctx,
+ const grpc_metadata* md, size_t md_count,
grpc_process_auth_metadata_done_cb cb,
- void *user_data) {
- const grpc_metadata *oauth2 =
+ void* user_data) {
+ const grpc_metadata* oauth2 =
find_metadata(md, md_count, "authorization", oauth2_md);
- test_processor_state *s;
+ test_processor_state* s;
GPR_ASSERT(state != NULL);
- s = (test_processor_state *)state;
+ s = (test_processor_state*)state;
GPR_ASSERT(s->pseudo_refcount == 1);
GPR_ASSERT(oauth2 != NULL);
cb(user_data, oauth2, 1, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL);
}
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(
gpr_malloc(sizeof(fullstack_secure_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -106,10 +108,10 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
}
static void chttp2_init_client_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- grpc_channel_credentials *creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args,
+ grpc_channel_credentials* creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
f->client =
grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client != NULL);
@@ -117,10 +119,10 @@ static void chttp2_init_client_secure_fullstack(
}
static void chttp2_init_server_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args,
- grpc_server_credentials *server_creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args,
+ grpc_server_credentials* server_creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -132,27 +134,27 @@ static void chttp2_init_server_secure_fullstack(
grpc_server_start(f->server);
}
-void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_channel_credentials *ssl_creds =
+ grpc_channel_credentials* ssl_creds =
grpc_ssl_credentials_create(test_root_cert, NULL, NULL);
- grpc_call_credentials *oauth2_creds = grpc_md_only_test_credentials_create(
+ grpc_call_credentials* oauth2_creds = grpc_md_only_test_credentials_create(
&exec_ctx, "authorization", oauth2_md, true /* is_async */);
- grpc_channel_credentials *ssl_oauth2_creds =
+ grpc_channel_credentials* ssl_oauth2_creds =
grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds, NULL);
grpc_arg ssl_name_override = {
GRPC_ARG_STRING,
- const_cast<char *>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
- {const_cast<char *>("foo.test.google.fr")}};
- grpc_channel_args *new_client_args =
+ const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
+ {const_cast<char*>("foo.test.google.fr")}};
+ grpc_channel_args* new_client_args =
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1);
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_oauth2_creds);
grpc_channel_args_destroy(&exec_ctx, new_client_args);
@@ -161,7 +163,7 @@ static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack(
grpc_exec_ctx_finish(&exec_ctx);
}
-static int fail_server_auth_check(grpc_channel_args *server_args) {
+static int fail_server_auth_check(grpc_channel_args* server_args) {
size_t i;
if (server_args == NULL) return 0;
for (i = 0; i < server_args->num_args; i++) {
@@ -173,15 +175,15 @@ static int fail_server_auth_check(grpc_channel_args *server_args) {
return 0;
}
-static void processor_destroy(void *state) {
- test_processor_state *s = (test_processor_state *)state;
+static void processor_destroy(void* state) {
+ test_processor_state* s = (test_processor_state*)state;
GPR_ASSERT((s->pseudo_refcount--) == 1);
gpr_free(s);
}
static grpc_auth_metadata_processor test_processor_create(int failing) {
- test_processor_state *s =
- static_cast<test_processor_state *>(gpr_malloc(sizeof(*s)));
+ test_processor_state* s =
+ static_cast<test_processor_state*>(gpr_malloc(sizeof(*s)));
grpc_auth_metadata_processor result;
s->pseudo_refcount = 1;
result.state = s;
@@ -195,10 +197,10 @@ static grpc_auth_metadata_processor test_processor_create(int failing) {
}
static void chttp2_init_server_simple_ssl_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args) {
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args) {
grpc_ssl_pem_key_cert_pair pem_key_cert_pair = {test_server1_key,
test_server1_cert};
- grpc_server_credentials *ssl_creds =
+ grpc_server_credentials* ssl_creds =
grpc_ssl_server_credentials_create(NULL, &pem_key_cert_pair, 1, 0, NULL);
grpc_server_credentials_set_auth_metadata_processor(
ssl_creds, test_processor_create(fail_server_auth_check(server_args)));
@@ -219,7 +221,7 @@ static grpc_end2end_test_config configs[] = {
chttp2_tear_down_secure_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
grpc_end2end_tests_pre_init();
diff --git a/test/core/end2end/fixtures/h2_proxy.cc b/test/core/end2end/fixtures/h2_proxy.cc
index e1eb9687d0..03ffa02e17 100644
--- a/test/core/end2end/fixtures/h2_proxy.cc
+++ b/test/core/end2end/fixtures/h2_proxy.cc
@@ -37,18 +37,18 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_fixture_data {
- grpc_end2end_proxy *proxy;
+ grpc_end2end_proxy* proxy;
} fullstack_fixture_data;
-static grpc_server *create_proxy_server(const char *port,
- grpc_channel_args *server_args) {
- grpc_server *s = grpc_server_create(server_args, 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,
- grpc_channel_args *client_args) {
+static grpc_channel* create_proxy_client(const char* target,
+ grpc_channel_args* client_args) {
return grpc_insecure_channel_create(target, client_args, NULL);
}
@@ -56,9 +56,9 @@ static const grpc_end2end_proxy_def proxy_def = {create_proxy_server,
create_proxy_client};
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -71,19 +71,19 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
f->client = grpc_insecure_channel_create(
grpc_end2end_proxy_get_client_target(ffd->proxy), client_args, NULL);
GPR_ASSERT(f->client);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -94,24 +94,25 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
grpc_end2end_proxy_destroy(ffd->proxy);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack+proxy", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_REQUEST_PROXYING |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack+proxy",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_REQUEST_PROXYING |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.cc b/test/core/end2end/fixtures/h2_sockpair+trace.cc
index 81d0768969..c5dfe40391 100644
--- a/test/core/end2end/fixtures/h2_sockpair+trace.cc
+++ b/test/core/end2end/fixtures/h2_sockpair+trace.cc
@@ -48,10 +48,10 @@
/* chttp2 transport that is immediately available (used for testing
connected_channel without a client_channel */
-static void server_setup_transport(void *ts, grpc_transport *transport) {
- grpc_end2end_test_fixture *f = static_cast<grpc_end2end_test_fixture *>(ts);
+static void server_setup_transport(void* ts, grpc_transport* transport) {
+ grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(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, NULL,
grpc_server_get_channel_args(f->server));
@@ -59,13 +59,13 @@ static void server_setup_transport(void *ts, grpc_transport *transport) {
}
typedef struct {
- grpc_end2end_test_fixture *f;
- grpc_channel_args *client_args;
+ grpc_end2end_test_fixture* f;
+ grpc_channel_args* client_args;
} sp_client_setup;
-static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts,
- grpc_transport *transport) {
- sp_client_setup *cs = static_cast<sp_client_setup *>(ts);
+static void client_setup_transport(grpc_exec_ctx* exec_ctx, void* ts,
+ grpc_transport* transport) {
+ sp_client_setup* cs = static_cast<sp_client_setup*>(ts);
cs->f->client =
grpc_channel_create(exec_ctx, "socketpair-target", cs->client_args,
@@ -73,9 +73,9 @@ static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts,
}
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
- grpc_endpoint_pair *sfd =
- static_cast<grpc_endpoint_pair *>(gpr_malloc(sizeof(grpc_endpoint_pair)));
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
+ grpc_endpoint_pair* sfd =
+ static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair)));
grpc_end2end_test_fixture f;
memset(&f, 0, sizeof(f));
@@ -88,11 +88,11 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
return f;
}
-static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
+static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
- grpc_transport *transport;
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
+ grpc_transport* transport;
sp_client_setup cs;
cs.client_args = client_args;
cs.f = f;
@@ -104,11 +104,11 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
+static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
- grpc_transport *transport;
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
+ grpc_transport* transport;
GPR_ASSERT(!f->server);
f->server = grpc_server_create(server_args, NULL);
grpc_server_register_completion_queue(f->server, f->cq, NULL);
@@ -120,7 +120,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
+static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture* f) {
gpr_free(f->fixture_data);
}
@@ -131,7 +131,7 @@ static grpc_end2end_test_config configs[] = {
chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
diff --git a/test/core/end2end/fixtures/h2_sockpair.cc b/test/core/end2end/fixtures/h2_sockpair.cc
index 78b5ad8877..f07722e52d 100644
--- a/test/core/end2end/fixtures/h2_sockpair.cc
+++ b/test/core/end2end/fixtures/h2_sockpair.cc
@@ -42,10 +42,10 @@
/* chttp2 transport that is immediately available (used for testing
connected_channel without a client_channel */
-static void server_setup_transport(void *ts, grpc_transport *transport) {
- grpc_end2end_test_fixture *f = static_cast<grpc_end2end_test_fixture *>(ts);
+static void server_setup_transport(void* ts, grpc_transport* transport) {
+ grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(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, NULL,
grpc_server_get_channel_args(f->server));
@@ -53,13 +53,13 @@ static void server_setup_transport(void *ts, grpc_transport *transport) {
}
typedef struct {
- grpc_end2end_test_fixture *f;
- grpc_channel_args *client_args;
+ grpc_end2end_test_fixture* f;
+ grpc_channel_args* client_args;
} sp_client_setup;
-static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts,
- grpc_transport *transport) {
- sp_client_setup *cs = static_cast<sp_client_setup *>(ts);
+static void client_setup_transport(grpc_exec_ctx* exec_ctx, void* ts,
+ grpc_transport* transport) {
+ sp_client_setup* cs = static_cast<sp_client_setup*>(ts);
cs->f->client =
grpc_channel_create(exec_ctx, "socketpair-target", cs->client_args,
@@ -67,9 +67,9 @@ static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts,
}
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
- grpc_endpoint_pair *sfd =
- static_cast<grpc_endpoint_pair *>(gpr_malloc(sizeof(grpc_endpoint_pair)));
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
+ grpc_endpoint_pair* sfd =
+ static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair)));
grpc_end2end_test_fixture f;
memset(&f, 0, sizeof(f));
@@ -82,11 +82,11 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
return f;
}
-static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
+static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
- grpc_transport *transport;
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
+ grpc_transport* transport;
sp_client_setup cs;
cs.client_args = client_args;
cs.f = f;
@@ -98,11 +98,11 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
+static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
- grpc_transport *transport;
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
+ grpc_transport* transport;
GPR_ASSERT(!f->server);
f->server = grpc_server_create(server_args, NULL);
grpc_server_register_completion_queue(f->server, f->cq, NULL);
@@ -114,7 +114,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
+static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture* f) {
gpr_free(f->fixture_data);
}
@@ -125,7 +125,7 @@ static grpc_end2end_test_config configs[] = {
chttp2_init_server_socketpair, chttp2_tear_down_socketpair},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.cc b/test/core/end2end/fixtures/h2_sockpair_1byte.cc
index b144771f2a..7d00c69a18 100644
--- a/test/core/end2end/fixtures/h2_sockpair_1byte.cc
+++ b/test/core/end2end/fixtures/h2_sockpair_1byte.cc
@@ -42,10 +42,10 @@
/* chttp2 transport that is immediately available (used for testing
connected_channel without a client_channel */
-static void server_setup_transport(void *ts, grpc_transport *transport) {
- grpc_end2end_test_fixture *f = static_cast<grpc_end2end_test_fixture *>(ts);
+static void server_setup_transport(void* ts, grpc_transport* transport) {
+ grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(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, NULL,
grpc_server_get_channel_args(f->server));
@@ -53,13 +53,13 @@ static void server_setup_transport(void *ts, grpc_transport *transport) {
}
typedef struct {
- grpc_end2end_test_fixture *f;
- grpc_channel_args *client_args;
+ grpc_end2end_test_fixture* f;
+ grpc_channel_args* client_args;
} sp_client_setup;
-static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts,
- grpc_transport *transport) {
- sp_client_setup *cs = static_cast<sp_client_setup *>(ts);
+static void client_setup_transport(grpc_exec_ctx* exec_ctx, void* ts,
+ grpc_transport* transport) {
+ sp_client_setup* cs = static_cast<sp_client_setup*>(ts);
cs->f->client =
grpc_channel_create(exec_ctx, "socketpair-target", cs->client_args,
@@ -67,9 +67,9 @@ static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts,
}
static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
- grpc_endpoint_pair *sfd =
- static_cast<grpc_endpoint_pair *>(gpr_malloc(sizeof(grpc_endpoint_pair)));
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
+ grpc_endpoint_pair* sfd =
+ static_cast<grpc_endpoint_pair*>(gpr_malloc(sizeof(grpc_endpoint_pair)));
grpc_end2end_test_fixture f;
memset(&f, 0, sizeof(f));
@@ -78,13 +78,13 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
f.shutdown_cq = grpc_completion_queue_create_for_pluck(NULL);
grpc_arg a[3];
- a[0].key = const_cast<char *>(GRPC_ARG_TCP_READ_CHUNK_SIZE);
+ a[0].key = const_cast<char*>(GRPC_ARG_TCP_READ_CHUNK_SIZE);
a[0].type = GRPC_ARG_INTEGER;
a[0].value.integer = 1;
- a[1].key = const_cast<char *>(GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE);
+ a[1].key = const_cast<char*>(GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE);
a[1].type = GRPC_ARG_INTEGER;
a[1].value.integer = 1;
- a[2].key = const_cast<char *>(GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE);
+ a[2].key = const_cast<char*>(GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE);
a[2].type = GRPC_ARG_INTEGER;
a[2].value.integer = 1;
grpc_channel_args args = {GPR_ARRAY_SIZE(a), a};
@@ -93,11 +93,11 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair(
return f;
}
-static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
+static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
- grpc_transport *transport;
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
+ grpc_transport* transport;
sp_client_setup cs;
cs.client_args = client_args;
cs.f = f;
@@ -109,11 +109,11 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
+static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_endpoint_pair *sfd = static_cast<grpc_endpoint_pair *>(f->fixture_data);
- grpc_transport *transport;
+ grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data);
+ grpc_transport* transport;
GPR_ASSERT(!f->server);
f->server = grpc_server_create(server_args, NULL);
grpc_server_register_completion_queue(f->server, f->cq, NULL);
@@ -125,7 +125,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f,
grpc_exec_ctx_finish(&exec_ctx);
}
-static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) {
+static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture* f) {
gpr_free(f->fixture_data);
}
@@ -137,7 +137,7 @@ static grpc_end2end_test_config configs[] = {
chttp2_tear_down_socketpair},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
g_fixture_slowdown_factor = 2;
diff --git a/test/core/end2end/fixtures/h2_ssl.cc b/test/core/end2end/fixtures/h2_ssl.cc
index 045a8b7f05..70daefd333 100644
--- a/test/core/end2end/fixtures/h2_ssl.cc
+++ b/test/core/end2end/fixtures/h2_ssl.cc
@@ -35,15 +35,15 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_secure_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_secure_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(
gpr_malloc(sizeof(fullstack_secure_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -56,19 +56,19 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f;
}
-static void process_auth_failure(void *state, grpc_auth_context *ctx,
- const grpc_metadata *md, size_t md_count,
+static void process_auth_failure(void* state, grpc_auth_context* ctx,
+ const grpc_metadata* md, size_t md_count,
grpc_process_auth_metadata_done_cb cb,
- void *user_data) {
+ void* user_data) {
GPR_ASSERT(state == NULL);
cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL);
}
static void chttp2_init_client_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- grpc_channel_credentials *creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args,
+ grpc_channel_credentials* creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
f->client =
grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client != NULL);
@@ -76,10 +76,10 @@ static void chttp2_init_client_secure_fullstack(
}
static void chttp2_init_server_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args,
- grpc_server_credentials *server_creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args,
+ grpc_server_credentials* server_creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -91,22 +91,22 @@ static void chttp2_init_server_secure_fullstack(
grpc_server_start(f->server);
}
-void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
static void chttp2_init_client_simple_ssl_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
- grpc_channel_credentials *ssl_creds =
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args) {
+ grpc_channel_credentials* ssl_creds =
grpc_ssl_credentials_create(NULL, NULL, NULL);
grpc_arg ssl_name_override = {
GRPC_ARG_STRING,
- const_cast<char *>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
- {const_cast<char *>("foo.test.google.fr")}};
- grpc_channel_args *new_client_args =
+ const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
+ {const_cast<char*>("foo.test.google.fr")}};
+ grpc_channel_args* new_client_args =
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1);
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds);
{
@@ -116,7 +116,7 @@ static void chttp2_init_client_simple_ssl_secure_fullstack(
}
}
-static int fail_server_auth_check(grpc_channel_args *server_args) {
+static int fail_server_auth_check(grpc_channel_args* server_args) {
size_t i;
if (server_args == NULL) return 0;
for (i = 0; i < server_args->num_args; i++) {
@@ -129,10 +129,10 @@ static int fail_server_auth_check(grpc_channel_args *server_args) {
}
static void chttp2_init_server_simple_ssl_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args) {
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args) {
grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key,
test_server1_cert};
- grpc_server_credentials *ssl_creds =
+ grpc_server_credentials* ssl_creds =
grpc_ssl_server_credentials_create(NULL, &pem_cert_key_pair, 1, 0, NULL);
if (fail_server_auth_check(server_args)) {
grpc_auth_metadata_processor processor = {process_auth_failure, NULL, NULL};
@@ -155,11 +155,11 @@ static grpc_end2end_test_config configs[] = {
chttp2_tear_down_secure_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
- FILE *roots_file;
+ FILE* roots_file;
size_t roots_size = strlen(test_root_cert);
- char *roots_filename;
+ char* roots_filename;
grpc_test_init(argc, argv);
grpc_end2end_tests_pre_init();
diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.cc b/test/core/end2end/fixtures/h2_ssl_proxy.cc
index b9b68c8780..b3488a29e5 100644
--- a/test/core/end2end/fixtures/h2_ssl_proxy.cc
+++ b/test/core/end2end/fixtures/h2_ssl_proxy.cc
@@ -36,31 +36,31 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_secure_fixture_data {
- grpc_end2end_proxy *proxy;
+ grpc_end2end_proxy* proxy;
} fullstack_secure_fixture_data;
-static grpc_server *create_proxy_server(const char *port,
- grpc_channel_args *server_args) {
- grpc_server *s = grpc_server_create(server_args, 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 =
+ grpc_server_credentials* ssl_creds =
grpc_ssl_server_credentials_create(NULL, &pem_cert_key_pair, 1, 0, NULL);
GPR_ASSERT(grpc_server_add_secure_http2_port(s, port, ssl_creds));
grpc_server_credentials_release(ssl_creds);
return s;
}
-static grpc_channel *create_proxy_client(const char *target,
- grpc_channel_args *client_args) {
- grpc_channel *channel;
- grpc_channel_credentials *ssl_creds =
+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,
- const_cast<char *>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
- {const_cast<char *>("foo.test.google.fr")}};
- grpc_channel_args *new_client_args =
+ const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
+ {const_cast<char*>("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);
@@ -77,10 +77,10 @@ static const grpc_end2end_proxy_def proxy_def = {create_proxy_server,
create_proxy_client};
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(
gpr_malloc(sizeof(fullstack_secure_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -93,19 +93,19 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f;
}
-static void process_auth_failure(void *state, grpc_auth_context *ctx,
- const grpc_metadata *md, size_t md_count,
+static void process_auth_failure(void* state, grpc_auth_context* ctx,
+ const grpc_metadata* md, size_t md_count,
grpc_process_auth_metadata_done_cb cb,
- void *user_data) {
+ void* user_data) {
GPR_ASSERT(state == NULL);
cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL);
}
static void chttp2_init_client_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- grpc_channel_credentials *creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args,
+ grpc_channel_credentials* creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
f->client = grpc_secure_channel_create(
creds, grpc_end2end_proxy_get_client_target(ffd->proxy), client_args,
NULL);
@@ -114,10 +114,10 @@ static void chttp2_init_client_secure_fullstack(
}
static void chttp2_init_server_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args,
- grpc_server_credentials *server_creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args,
+ grpc_server_credentials* server_creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -129,22 +129,22 @@ static void chttp2_init_server_secure_fullstack(
grpc_server_start(f->server);
}
-void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
grpc_end2end_proxy_destroy(ffd->proxy);
gpr_free(ffd);
}
static void chttp2_init_client_simple_ssl_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args) {
- grpc_channel_credentials *ssl_creds =
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args) {
+ grpc_channel_credentials* ssl_creds =
grpc_ssl_credentials_create(NULL, NULL, NULL);
grpc_arg ssl_name_override = {
GRPC_ARG_STRING,
- const_cast<char *>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
- {const_cast<char *>("foo.test.google.fr")}};
- grpc_channel_args *new_client_args =
+ const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
+ {const_cast<char*>("foo.test.google.fr")}};
+ grpc_channel_args* new_client_args =
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1);
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds);
{
@@ -154,7 +154,7 @@ static void chttp2_init_client_simple_ssl_secure_fullstack(
}
}
-static int fail_server_auth_check(grpc_channel_args *server_args) {
+static int fail_server_auth_check(grpc_channel_args* server_args) {
size_t i;
if (server_args == NULL) return 0;
for (i = 0; i < server_args->num_args; i++) {
@@ -167,10 +167,10 @@ static int fail_server_auth_check(grpc_channel_args *server_args) {
}
static void chttp2_init_server_simple_ssl_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args) {
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args) {
grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key,
test_server1_cert};
- grpc_server_credentials *ssl_creds =
+ grpc_server_credentials* ssl_creds =
grpc_ssl_server_credentials_create(NULL, &pem_cert_key_pair, 1, 0, NULL);
if (fail_server_auth_check(server_args)) {
grpc_auth_metadata_processor processor = {process_auth_failure, NULL, NULL};
@@ -194,11 +194,11 @@ static grpc_end2end_test_config configs[] = {
chttp2_tear_down_secure_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
- FILE *roots_file;
+ FILE* roots_file;
size_t roots_size = strlen(test_root_cert);
- char *roots_filename;
+ char* roots_filename;
grpc_test_init(argc, argv);
grpc_end2end_tests_pre_init();
diff --git a/test/core/end2end/fixtures/h2_uds.cc b/test/core/end2end/fixtures/h2_uds.cc
index f9336b5edc..ba433df57b 100644
--- a/test/core/end2end/fixtures/h2_uds.cc
+++ b/test/core/end2end/fixtures/h2_uds.cc
@@ -40,15 +40,15 @@
#include "test/core/util/test_config.h"
typedef struct fullstack_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_fixture_data;
static int unique = 1;
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
- fullstack_fixture_data *ffd = static_cast<fullstack_fixture_data *>(
+ fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(
gpr_malloc(sizeof(fullstack_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -62,17 +62,17 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
return f;
}
-void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL);
}
-void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -82,23 +82,24 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_fixture_data *ffd =
- static_cast<fullstack_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_fixture_data* ffd =
+ static_cast<fullstack_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack_uds", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
- FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
+ {"chttp2/fullstack_uds",
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
+ FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/inproc.cc b/test/core/end2end/fixtures/inproc.cc
index c075dc629f..5107ed2018 100644
--- a/test/core/end2end/fixtures/inproc.cc
+++ b/test/core/end2end/fixtures/inproc.cc
@@ -40,9 +40,9 @@ typedef struct inproc_fixture_data {
} inproc_fixture_data;
static grpc_end2end_test_fixture inproc_create_fixture(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
- inproc_fixture_data *ffd = static_cast<inproc_fixture_data *>(
+ inproc_fixture_data* ffd = static_cast<inproc_fixture_data*>(
gpr_malloc(sizeof(inproc_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -53,14 +53,14 @@ static grpc_end2end_test_fixture inproc_create_fixture(
return f;
}
-void inproc_init_client(grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args) {
+void inproc_init_client(grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args) {
f->client = grpc_inproc_channel_create(f->server, client_args, NULL);
GPR_ASSERT(f->client);
}
-void inproc_init_server(grpc_end2end_test_fixture *f,
- grpc_channel_args *server_args) {
+void inproc_init_server(grpc_end2end_test_fixture* f,
+ grpc_channel_args* server_args) {
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -69,9 +69,8 @@ void inproc_init_server(grpc_end2end_test_fixture *f,
grpc_server_start(f->server);
}
-void inproc_tear_down(grpc_end2end_test_fixture *f) {
- inproc_fixture_data *ffd =
- static_cast<inproc_fixture_data *>(f->fixture_data);
+void inproc_tear_down(grpc_end2end_test_fixture* f) {
+ inproc_fixture_data* ffd = static_cast<inproc_fixture_data*>(f->fixture_data);
gpr_free(ffd);
}
@@ -81,7 +80,7 @@ static grpc_end2end_test_config configs[] = {
inproc_init_client, inproc_init_server, inproc_tear_down},
};
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
size_t i;
grpc_test_init(argc, argv);
diff --git a/test/core/end2end/fixtures/proxy.cc b/test/core/end2end/fixtures/proxy.cc
index 6a2d75da09..01c9e13538 100644
--- a/test/core/end2end/fixtures/proxy.cc
+++ b/test/core/end2end/fixtures/proxy.cc
@@ -31,37 +31,37 @@
struct grpc_end2end_proxy {
gpr_thd_id thd;
- char *proxy_port;
- char *server_port;
- grpc_completion_queue *cq;
- grpc_server *server;
- grpc_channel *client;
+ char* proxy_port;
+ char* server_port;
+ grpc_completion_queue* cq;
+ grpc_server* server;
+ grpc_channel* client;
int shutdown;
/* requested call */
- grpc_call *new_call;
+ grpc_call* new_call;
grpc_call_details new_call_details;
grpc_metadata_array new_call_metadata;
};
typedef struct {
- void (*func)(void *arg, int success);
- void *arg;
+ void (*func)(void* arg, int success);
+ void* arg;
} closure;
typedef struct {
gpr_refcount refs;
- grpc_end2end_proxy *proxy;
+ grpc_end2end_proxy* proxy;
- grpc_call *c2p;
- grpc_call *p2s;
+ grpc_call* c2p;
+ grpc_call* p2s;
grpc_metadata_array c2p_initial_metadata;
grpc_metadata_array p2s_initial_metadata;
- grpc_byte_buffer *c2p_msg;
- grpc_byte_buffer *p2s_msg;
+ grpc_byte_buffer* c2p_msg;
+ grpc_byte_buffer* p2s_msg;
grpc_metadata_array p2s_trailing_metadata;
grpc_status_code p2s_status;
@@ -70,17 +70,17 @@ typedef struct {
int c2p_server_cancelled;
} proxy_call;
-static void thread_main(void *arg);
-static void request_call(grpc_end2end_proxy *proxy);
+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();
- grpc_end2end_proxy *proxy = (grpc_end2end_proxy *)gpr_malloc(sizeof(*proxy));
+ grpc_end2end_proxy* proxy = (grpc_end2end_proxy*)gpr_malloc(sizeof(*proxy));
memset(proxy, 0, sizeof(*proxy));
gpr_join_host_port(&proxy->proxy_port, "localhost", proxy_port);
@@ -105,20 +105,20 @@ grpc_end2end_proxy *grpc_end2end_proxy_create(const grpc_end2end_proxy_def *def,
return proxy;
}
-static closure *new_closure(void (*func)(void *arg, int success), void *arg) {
- closure *cl = (closure *)gpr_malloc(sizeof(*cl));
+static closure* new_closure(void (*func)(void* arg, int success), void* arg) {
+ closure* cl = (closure*)gpr_malloc(sizeof(*cl));
cl->func = func;
cl->arg = arg;
return cl;
}
-static void shutdown_complete(void *arg, int success) {
- grpc_end2end_proxy *proxy = (grpc_end2end_proxy *)arg;
+static void shutdown_complete(void* arg, int success) {
+ grpc_end2end_proxy* proxy = (grpc_end2end_proxy*)arg;
proxy->shutdown = 1;
grpc_completion_queue_shutdown(proxy->cq);
}
-void grpc_end2end_proxy_destroy(grpc_end2end_proxy *proxy) {
+void grpc_end2end_proxy_destroy(grpc_end2end_proxy* proxy) {
grpc_server_shutdown_and_notify(proxy->server, proxy->cq,
new_closure(shutdown_complete, proxy));
gpr_thd_join(proxy->thd);
@@ -131,7 +131,7 @@ void grpc_end2end_proxy_destroy(grpc_end2end_proxy *proxy) {
gpr_free(proxy);
}
-static void unrefpc(proxy_call *pc, const char *reason) {
+static void unrefpc(proxy_call* pc, const char* reason) {
if (gpr_unref(&pc->refs)) {
grpc_call_unref(pc->c2p);
grpc_call_unref(pc->p2s);
@@ -143,15 +143,15 @@ static void unrefpc(proxy_call *pc, const char *reason) {
}
}
-static void refpc(proxy_call *pc, const char *reason) { gpr_ref(&pc->refs); }
+static void refpc(proxy_call* pc, const char* reason) { gpr_ref(&pc->refs); }
-static void on_c2p_sent_initial_metadata(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_c2p_sent_initial_metadata(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
unrefpc(pc, "on_c2p_sent_initial_metadata");
}
-static void on_p2s_recv_initial_metadata(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_p2s_recv_initial_metadata(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
grpc_op op;
grpc_call_error err;
@@ -171,15 +171,15 @@ static void on_p2s_recv_initial_metadata(void *arg, int success) {
unrefpc(pc, "on_p2s_recv_initial_metadata");
}
-static void on_p2s_sent_initial_metadata(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_p2s_sent_initial_metadata(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
unrefpc(pc, "on_p2s_sent_initial_metadata");
}
-static void on_c2p_recv_msg(void *arg, int success);
+static void on_c2p_recv_msg(void* arg, int success);
-static void on_p2s_sent_message(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_p2s_sent_message(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
grpc_op op;
grpc_call_error err;
@@ -198,13 +198,13 @@ static void on_p2s_sent_message(void *arg, int success) {
unrefpc(pc, "on_p2s_sent_message");
}
-static void on_p2s_sent_close(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_p2s_sent_close(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
unrefpc(pc, "on_p2s_sent_close");
}
-static void on_c2p_recv_msg(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_c2p_recv_msg(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
grpc_op op;
grpc_call_error err;
@@ -236,10 +236,10 @@ static void on_c2p_recv_msg(void *arg, int success) {
unrefpc(pc, "on_c2p_recv_msg");
}
-static void on_p2s_recv_msg(void *arg, int success);
+static void on_p2s_recv_msg(void* arg, int success);
-static void on_c2p_sent_message(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_c2p_sent_message(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
grpc_op op;
grpc_call_error err;
@@ -258,8 +258,8 @@ static void on_c2p_sent_message(void *arg, int success) {
unrefpc(pc, "on_c2p_sent_message");
}
-static void on_p2s_recv_msg(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_p2s_recv_msg(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
grpc_op op;
grpc_call_error err;
@@ -278,13 +278,13 @@ static void on_p2s_recv_msg(void *arg, int success) {
unrefpc(pc, "on_p2s_recv_msg");
}
-static void on_c2p_sent_status(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_c2p_sent_status(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
unrefpc(pc, "on_c2p_sent_status");
}
-static void on_p2s_status(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_p2s_status(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
grpc_op op;
grpc_call_error err;
@@ -308,19 +308,19 @@ static void on_p2s_status(void *arg, int success) {
unrefpc(pc, "on_p2s_status");
}
-static void on_c2p_closed(void *arg, int success) {
- proxy_call *pc = (proxy_call *)arg;
+static void on_c2p_closed(void* arg, int success) {
+ proxy_call* pc = (proxy_call*)arg;
unrefpc(pc, "on_c2p_closed");
}
-static void on_new_call(void *arg, int success) {
- grpc_end2end_proxy *proxy = (grpc_end2end_proxy *)arg;
+static void on_new_call(void* arg, int success) {
+ grpc_end2end_proxy* proxy = (grpc_end2end_proxy*)arg;
grpc_call_error err;
if (success) {
grpc_op op;
memset(&op, 0, sizeof(op));
- proxy_call *pc = (proxy_call *)gpr_malloc(sizeof(*pc));
+ proxy_call* pc = (proxy_call*)gpr_malloc(sizeof(*pc));
memset(pc, 0, sizeof(*pc));
pc->proxy = proxy;
GPR_SWAP(grpc_metadata_array, pc->c2p_initial_metadata,
@@ -398,7 +398,7 @@ static void on_new_call(void *arg, int success) {
}
}
-static void request_call(grpc_end2end_proxy *proxy) {
+static void request_call(grpc_end2end_proxy* proxy) {
proxy->new_call = NULL;
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(
proxy->server, &proxy->new_call,
@@ -407,9 +407,9 @@ static void request_call(grpc_end2end_proxy *proxy) {
proxy->cq, new_closure(on_new_call, proxy)));
}
-static void thread_main(void *arg) {
- grpc_end2end_proxy *proxy = (grpc_end2end_proxy *)arg;
- closure *cl;
+static void thread_main(void* arg) {
+ grpc_end2end_proxy* proxy = (grpc_end2end_proxy*)arg;
+ closure* cl;
for (;;) {
grpc_event ev = grpc_completion_queue_next(
proxy->cq, gpr_inf_future(GPR_CLOCK_MONOTONIC), NULL);
@@ -420,7 +420,7 @@ static void thread_main(void *arg) {
case GRPC_QUEUE_SHUTDOWN:
return;
case GRPC_OP_COMPLETE:
- cl = (closure *)ev.tag;
+ cl = (closure*)ev.tag;
cl->func(cl->arg, ev.success);
gpr_free(cl);
break;
@@ -428,10 +428,10 @@ static void thread_main(void *arg) {
}
}
-const char *grpc_end2end_proxy_get_client_target(grpc_end2end_proxy *proxy) {
+const char* grpc_end2end_proxy_get_client_target(grpc_end2end_proxy* proxy) {
return proxy->proxy_port;
}
-const char *grpc_end2end_proxy_get_server_port(grpc_end2end_proxy *proxy) {
+const char* grpc_end2end_proxy_get_server_port(grpc_end2end_proxy* proxy) {
return proxy->server_port;
}
diff --git a/test/core/end2end/fixtures/proxy.h b/test/core/end2end/fixtures/proxy.h
index 89b965c903..18ad763ea7 100644
--- a/test/core/end2end/fixtures/proxy.h
+++ b/test/core/end2end/fixtures/proxy.h
@@ -26,18 +26,18 @@
typedef struct grpc_end2end_proxy grpc_end2end_proxy;
typedef struct grpc_end2end_proxy_def {
- 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_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,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args);
-void grpc_end2end_proxy_destroy(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);
+void grpc_end2end_proxy_destroy(grpc_end2end_proxy* proxy);
-const char *grpc_end2end_proxy_get_client_target(grpc_end2end_proxy *proxy);
-const char *grpc_end2end_proxy_get_server_port(grpc_end2end_proxy *proxy);
+const char* grpc_end2end_proxy_get_client_target(grpc_end2end_proxy* proxy);
+const char* grpc_end2end_proxy_get_server_port(grpc_end2end_proxy* proxy);
#endif /* GRPC_TEST_CORE_END2END_FIXTURES_PROXY_H */
diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc
index 69d25533f1..69a5670d22 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.cc
+++ b/test/core/end2end/fuzzers/api_fuzzer.cc
@@ -46,15 +46,15 @@
bool squelch = true;
bool leak_check = true;
-static void dont_log(gpr_log_func_args *args) {}
+static void dont_log(gpr_log_func_args* args) {}
////////////////////////////////////////////////////////////////////////////////
// global state
static gpr_timespec g_now;
-static grpc_server *g_server;
-static grpc_channel *g_channel;
-static grpc_resource_quota *g_resource_quota;
+static grpc_server* g_server;
+static grpc_channel* g_channel;
+static grpc_resource_quota* g_resource_quota;
extern "C" gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type);
@@ -70,28 +70,28 @@ static gpr_timespec now_impl(gpr_clock_type clock_type) {
// past the end (avoiding needing to check everywhere)
typedef struct {
- const uint8_t *cur;
- const uint8_t *end;
+ const uint8_t* cur;
+ const uint8_t* end;
} input_stream;
-static uint8_t next_byte(input_stream *inp) {
+static uint8_t next_byte(input_stream* inp) {
if (inp->cur == inp->end) {
return 0;
}
return *inp->cur++;
}
-static void end(input_stream *inp) { inp->cur = inp->end; }
+static void end(input_stream* inp) { inp->cur = inp->end; }
-static char *read_string(input_stream *inp, bool *special) {
- char *str = NULL;
+static char* read_string(input_stream* inp, bool* special) {
+ char* str = NULL;
size_t cap = 0;
size_t sz = 0;
char c;
do {
if (cap == sz) {
cap = GPR_MAX(3 * cap / 2, cap + 8);
- str = static_cast<char *>(gpr_realloc(str, cap));
+ str = static_cast<char*>(gpr_realloc(str, cap));
}
c = (char)next_byte(inp);
str[sz++] = c;
@@ -105,8 +105,8 @@ static char *read_string(input_stream *inp, bool *special) {
return str;
}
-static void read_buffer(input_stream *inp, char **buffer, size_t *length,
- bool *special) {
+static void read_buffer(input_stream* inp, char** buffer, size_t* length,
+ bool* special) {
*length = next_byte(inp);
if (*length == 255) {
if (special != NULL) *special = true;
@@ -114,7 +114,7 @@ static void read_buffer(input_stream *inp, char **buffer, size_t *length,
} else {
if (special != NULL) *special = false;
}
- *buffer = static_cast<char *>(gpr_malloc(*length));
+ *buffer = static_cast<char*>(gpr_malloc(*length));
for (size_t i = 0; i < *length; i++) {
(*buffer)[i] = (char)next_byte(inp);
}
@@ -126,16 +126,16 @@ static grpc_slice maybe_intern(grpc_slice s, bool intern) {
return r;
}
-static grpc_slice read_string_like_slice(input_stream *inp) {
+static grpc_slice read_string_like_slice(input_stream* inp) {
bool special;
- char *s = read_string(inp, &special);
+ char* s = read_string(inp, &special);
grpc_slice r = maybe_intern(grpc_slice_from_copied_string(s), special);
gpr_free(s);
return r;
}
-static grpc_slice read_buffer_like_slice(input_stream *inp) {
- char *buffer;
+static grpc_slice read_buffer_like_slice(input_stream* inp) {
+ char* buffer;
size_t length;
bool special;
read_buffer(inp, &buffer, &length, &special);
@@ -145,7 +145,7 @@ static grpc_slice read_buffer_like_slice(input_stream *inp) {
return r;
}
-static uint32_t read_uint22(input_stream *inp) {
+static uint32_t read_uint22(input_stream* inp) {
uint8_t b = next_byte(inp);
uint32_t x = b & 0x7f;
if (b & 0x80) {
@@ -160,7 +160,7 @@ static uint32_t read_uint22(input_stream *inp) {
return x;
}
-static uint32_t read_uint32(input_stream *inp) {
+static uint32_t read_uint32(input_stream* inp) {
uint8_t b = next_byte(inp);
uint32_t x = b & 0x7f;
if (b & 0x80) {
@@ -184,19 +184,19 @@ static uint32_t read_uint32(input_stream *inp) {
return x;
}
-static grpc_byte_buffer *read_message(input_stream *inp) {
+static grpc_byte_buffer* read_message(input_stream* inp) {
grpc_slice slice = grpc_slice_malloc(read_uint22(inp));
memset(GRPC_SLICE_START_PTR(slice), 0, GRPC_SLICE_LENGTH(slice));
- grpc_byte_buffer *out = grpc_raw_byte_buffer_create(&slice, 1);
+ grpc_byte_buffer* out = grpc_raw_byte_buffer_create(&slice, 1);
grpc_slice_unref(slice);
return out;
}
-static int read_int(input_stream *inp) { return (int)read_uint32(inp); }
+static int read_int(input_stream* inp) { return (int)read_uint32(inp); }
-static grpc_channel_args *read_args(input_stream *inp) {
+static grpc_channel_args* read_args(input_stream* inp) {
size_t n = next_byte(inp);
- grpc_arg *args = static_cast<grpc_arg *>(gpr_malloc(sizeof(*args) * n));
+ grpc_arg* args = static_cast<grpc_arg*>(gpr_malloc(sizeof(*args) * n));
for (size_t i = 0; i < n; i++) {
switch (next_byte(inp)) {
case 1:
@@ -222,8 +222,8 @@ static grpc_channel_args *read_args(input_stream *inp) {
break;
}
}
- grpc_channel_args *a =
- static_cast<grpc_channel_args *>(gpr_malloc(sizeof(*a)));
+ grpc_channel_args* a =
+ static_cast<grpc_channel_args*>(gpr_malloc(sizeof(*a)));
a->args = args;
a->num_args = n;
return a;
@@ -231,21 +231,21 @@ static grpc_channel_args *read_args(input_stream *inp) {
typedef struct cred_artifact_ctx {
int num_release;
- char *release[3];
+ char* release[3];
} cred_artifact_ctx;
#define CRED_ARTIFACT_CTX_INIT \
{ \
0, { 0 } \
}
-static void cred_artifact_ctx_finish(cred_artifact_ctx *ctx) {
+static void cred_artifact_ctx_finish(cred_artifact_ctx* ctx) {
for (int i = 0; i < ctx->num_release; i++) {
gpr_free(ctx->release[i]);
}
}
-static const char *read_cred_artifact(cred_artifact_ctx *ctx, input_stream *inp,
- const char **builtins,
+static const char* read_cred_artifact(cred_artifact_ctx* ctx, input_stream* inp,
+ const char** builtins,
size_t num_builtins) {
uint8_t b = next_byte(inp);
if (b == 0) return NULL;
@@ -257,28 +257,28 @@ static const char *read_cred_artifact(cred_artifact_ctx *ctx, input_stream *inp,
return builtins[b - 1];
}
-static grpc_channel_credentials *read_ssl_channel_creds(input_stream *inp) {
+static grpc_channel_credentials* read_ssl_channel_creds(input_stream* inp) {
cred_artifact_ctx ctx = CRED_ARTIFACT_CTX_INIT;
- static const char *builtin_root_certs[] = {test_root_cert};
- static const char *builtin_private_keys[] = {
+ static const char* builtin_root_certs[] = {test_root_cert};
+ static const char* builtin_private_keys[] = {
test_server1_key, test_self_signed_client_key, test_signed_client_key};
- static const char *builtin_cert_chains[] = {
+ static const char* builtin_cert_chains[] = {
test_server1_cert, test_self_signed_client_cert, test_signed_client_cert};
- const char *root_certs = read_cred_artifact(
+ const char* root_certs = read_cred_artifact(
&ctx, inp, builtin_root_certs, GPR_ARRAY_SIZE(builtin_root_certs));
- const char *private_key = read_cred_artifact(
+ const char* private_key = read_cred_artifact(
&ctx, inp, builtin_private_keys, GPR_ARRAY_SIZE(builtin_private_keys));
- const char *certs = read_cred_artifact(&ctx, inp, builtin_cert_chains,
+ const char* certs = read_cred_artifact(&ctx, inp, builtin_cert_chains,
GPR_ARRAY_SIZE(builtin_cert_chains));
grpc_ssl_pem_key_cert_pair key_cert_pair = {private_key, certs};
- grpc_channel_credentials *creds = grpc_ssl_credentials_create(
+ grpc_channel_credentials* creds = grpc_ssl_credentials_create(
root_certs, private_key != NULL && certs != NULL ? &key_cert_pair : NULL,
NULL);
cred_artifact_ctx_finish(&ctx);
return creds;
}
-static grpc_call_credentials *read_call_creds(input_stream *inp) {
+static grpc_call_credentials* read_call_creds(input_stream* inp) {
switch (next_byte(inp)) {
default:
end(inp);
@@ -286,10 +286,10 @@ static grpc_call_credentials *read_call_creds(input_stream *inp) {
case 0:
return NULL;
case 1: {
- grpc_call_credentials *c1 = read_call_creds(inp);
- grpc_call_credentials *c2 = read_call_creds(inp);
+ grpc_call_credentials* c1 = read_call_creds(inp);
+ grpc_call_credentials* c2 = read_call_creds(inp);
if (c1 != NULL && c2 != NULL) {
- grpc_call_credentials *out =
+ grpc_call_credentials* out =
grpc_composite_call_credentials_create(c1, c2, NULL);
grpc_call_credentials_release(c1);
grpc_call_credentials_release(c2);
@@ -305,18 +305,19 @@ static grpc_call_credentials *read_call_creds(input_stream *inp) {
}
case 2: {
cred_artifact_ctx ctx = CRED_ARTIFACT_CTX_INIT;
- const char *access_token = read_cred_artifact(&ctx, inp, NULL, 0);
- grpc_call_credentials *out =
- access_token == NULL ? NULL : grpc_access_token_credentials_create(
- access_token, NULL);
+ const char* access_token = read_cred_artifact(&ctx, inp, NULL, 0);
+ grpc_call_credentials* out =
+ access_token == NULL
+ ? NULL
+ : grpc_access_token_credentials_create(access_token, NULL);
cred_artifact_ctx_finish(&ctx);
return out;
}
case 3: {
cred_artifact_ctx ctx = CRED_ARTIFACT_CTX_INIT;
- const char *auth_token = read_cred_artifact(&ctx, inp, NULL, 0);
- const char *auth_selector = read_cred_artifact(&ctx, inp, NULL, 0);
- grpc_call_credentials *out = auth_token == NULL || auth_selector == NULL
+ const char* auth_token = read_cred_artifact(&ctx, inp, NULL, 0);
+ const char* auth_selector = read_cred_artifact(&ctx, inp, NULL, 0);
+ grpc_call_credentials* out = auth_token == NULL || auth_selector == NULL
? NULL
: grpc_google_iam_credentials_create(
auth_token, auth_selector, NULL);
@@ -327,16 +328,16 @@ static grpc_call_credentials *read_call_creds(input_stream *inp) {
}
}
-static grpc_channel_credentials *read_channel_creds(input_stream *inp) {
+static grpc_channel_credentials* read_channel_creds(input_stream* inp) {
switch (next_byte(inp)) {
case 0:
return read_ssl_channel_creds(inp);
break;
case 1: {
- grpc_channel_credentials *c1 = read_channel_creds(inp);
- grpc_call_credentials *c2 = read_call_creds(inp);
+ grpc_channel_credentials* c1 = read_channel_creds(inp);
+ grpc_call_credentials* c2 = read_call_creds(inp);
if (c1 != NULL && c2 != NULL) {
- grpc_channel_credentials *out =
+ grpc_channel_credentials* out =
grpc_composite_channel_credentials_create(c1, c2, NULL);
grpc_channel_credentials_release(c1);
grpc_call_credentials_release(c2);
@@ -359,34 +360,34 @@ static grpc_channel_credentials *read_channel_creds(input_stream *inp) {
}
}
-static bool is_eof(input_stream *inp) { return inp->cur == inp->end; }
+static bool is_eof(input_stream* inp) { return inp->cur == inp->end; }
////////////////////////////////////////////////////////////////////////////////
// dns resolution
typedef struct addr_req {
grpc_timer timer;
- char *addr;
- grpc_closure *on_done;
- grpc_resolved_addresses **addrs;
- grpc_lb_addresses **lb_addrs;
+ char* addr;
+ grpc_closure* on_done;
+ grpc_resolved_addresses** addrs;
+ grpc_lb_addresses** lb_addrs;
} addr_req;
-static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- addr_req *r = static_cast<addr_req *>(arg);
+static void finish_resolve(grpc_exec_ctx* exec_ctx, void* arg,
+ grpc_error* error) {
+ addr_req* r = static_cast<addr_req*>(arg);
if (error == GRPC_ERROR_NONE && 0 == strcmp(r->addr, "server")) {
if (r->addrs != NULL) {
- grpc_resolved_addresses *addrs =
- static_cast<grpc_resolved_addresses *>(gpr_malloc(sizeof(*addrs)));
+ grpc_resolved_addresses* addrs =
+ static_cast<grpc_resolved_addresses*>(gpr_malloc(sizeof(*addrs)));
addrs->naddrs = 1;
- addrs->addrs = static_cast<grpc_resolved_address *>(
+ addrs->addrs = static_cast<grpc_resolved_address*>(
gpr_malloc(sizeof(*addrs->addrs)));
addrs->addrs[0].len = 0;
*r->addrs = addrs;
} else if (r->lb_addrs != NULL) {
- grpc_lb_addresses *lb_addrs = grpc_lb_addresses_create(1, NULL);
+ grpc_lb_addresses* lb_addrs = grpc_lb_addresses_create(1, NULL);
grpc_lb_addresses_set_address(lb_addrs, 0, NULL, 0, false, NULL, NULL);
*r->lb_addrs = lb_addrs;
}
@@ -401,12 +402,12 @@ static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg,
gpr_free(r);
}
-void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr,
- const char *default_port,
- grpc_pollset_set *interested_parties,
- grpc_closure *on_done,
- grpc_resolved_addresses **addresses) {
- addr_req *r = static_cast<addr_req *>(gpr_malloc(sizeof(*r)));
+void my_resolve_address(grpc_exec_ctx* exec_ctx, const char* addr,
+ const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addresses) {
+ addr_req* r = static_cast<addr_req*>(gpr_malloc(sizeof(*r)));
r->addr = gpr_strdup(addr);
r->on_done = on_done;
r->addrs = addresses;
@@ -416,12 +417,12 @@ void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr,
GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx));
}
-grpc_ares_request *my_dns_lookup_ares(
- grpc_exec_ctx *exec_ctx, const char *dns_server, const char *addr,
- const char *default_port, grpc_pollset_set *interested_parties,
- grpc_closure *on_done, grpc_lb_addresses **lb_addrs, bool check_grpclb,
- char **service_config_json) {
- addr_req *r = static_cast<addr_req *>(gpr_malloc(sizeof(*r)));
+grpc_ares_request* my_dns_lookup_ares(
+ grpc_exec_ctx* exec_ctx, const char* dns_server, const char* addr,
+ const char* default_port, grpc_pollset_set* interested_parties,
+ grpc_closure* on_done, grpc_lb_addresses** lb_addrs, bool check_grpclb,
+ char** service_config_json) {
+ addr_req* r = static_cast<addr_req*>(gpr_malloc(sizeof(*r)));
r->addr = gpr_strdup(addr);
r->on_done = on_done;
r->addrs = NULL;
@@ -437,32 +438,32 @@ grpc_ares_request *my_dns_lookup_ares(
// defined in tcp_client_posix.c
extern "C" void (*grpc_tcp_client_connect_impl)(
- grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
- grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args,
- const grpc_resolved_address *addr, grpc_millis deadline);
+ grpc_exec_ctx* exec_ctx, grpc_closure* closure, grpc_endpoint** ep,
+ grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr, grpc_millis deadline);
-static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
- grpc_endpoint **ep, gpr_timespec deadline);
+static void sched_connect(grpc_exec_ctx* exec_ctx, grpc_closure* closure,
+ grpc_endpoint** ep, gpr_timespec deadline);
typedef struct {
grpc_timer timer;
- grpc_closure *closure;
- grpc_endpoint **ep;
+ grpc_closure* closure;
+ grpc_endpoint** ep;
gpr_timespec deadline;
} future_connect;
-static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
- future_connect *fc = static_cast<future_connect *>(arg);
+static void do_connect(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
+ future_connect* fc = static_cast<future_connect*>(arg);
if (error != GRPC_ERROR_NONE) {
*fc->ep = NULL;
GRPC_CLOSURE_SCHED(exec_ctx, fc->closure, GRPC_ERROR_REF(error));
} else if (g_server != NULL) {
- grpc_endpoint *client;
- grpc_endpoint *server;
+ grpc_endpoint* client;
+ grpc_endpoint* server;
grpc_passthru_endpoint_create(&client, &server, g_resource_quota, NULL);
*fc->ep = client;
- grpc_transport *transport =
+ grpc_transport* transport =
grpc_create_chttp2_transport(exec_ctx, NULL, server, 0);
grpc_server_setup_transport(exec_ctx, g_server, transport, NULL, NULL);
grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL);
@@ -474,16 +475,17 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
gpr_free(fc);
}
-static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
- grpc_endpoint **ep, gpr_timespec deadline) {
+static void sched_connect(grpc_exec_ctx* exec_ctx, grpc_closure* closure,
+ grpc_endpoint** ep, gpr_timespec deadline) {
if (gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) < 0) {
*ep = NULL;
- GRPC_CLOSURE_SCHED(exec_ctx, closure, GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Connect deadline exceeded"));
+ GRPC_CLOSURE_SCHED(
+ exec_ctx, closure,
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Connect deadline exceeded"));
return;
}
- future_connect *fc = static_cast<future_connect *>(gpr_malloc(sizeof(*fc)));
+ future_connect* fc = static_cast<future_connect*>(gpr_malloc(sizeof(*fc)));
fc->closure = closure;
fc->ep = ep;
fc->deadline = deadline;
@@ -492,11 +494,11 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
GRPC_CLOSURE_CREATE(do_connect, fc, grpc_schedule_on_exec_ctx));
}
-static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx,
- grpc_closure *closure, grpc_endpoint **ep,
- grpc_pollset_set *interested_parties,
- const grpc_channel_args *channel_args,
- const grpc_resolved_address *addr,
+static void my_tcp_client_connect(grpc_exec_ctx* exec_ctx,
+ grpc_closure* closure, grpc_endpoint** ep,
+ grpc_pollset_set* interested_parties,
+ const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr,
grpc_millis deadline) {
sched_connect(exec_ctx, closure, ep,
grpc_millis_to_timespec(deadline, GPR_CLOCK_MONOTONIC));
@@ -506,41 +508,41 @@ static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx,
// test driver
typedef struct validator {
- void (*validate)(void *arg, bool success);
- void *arg;
+ void (*validate)(void* arg, bool success);
+ void* arg;
} validator;
-static validator *create_validator(void (*validate)(void *arg, bool success),
- void *arg) {
- validator *v = static_cast<validator *>(gpr_malloc(sizeof(*v)));
+static validator* create_validator(void (*validate)(void* arg, bool success),
+ void* arg) {
+ validator* v = static_cast<validator*>(gpr_malloc(sizeof(*v)));
v->validate = validate;
v->arg = arg;
return v;
}
-static void assert_success_and_decrement(void *counter, bool success) {
+static void assert_success_and_decrement(void* counter, bool success) {
GPR_ASSERT(success);
- --*(int *)counter;
+ --*(int*)counter;
}
-static void decrement(void *counter, bool success) { --*(int *)counter; }
+static void decrement(void* counter, bool success) { --*(int*)counter; }
typedef struct connectivity_watch {
- int *counter;
+ int* counter;
gpr_timespec deadline;
} connectivity_watch;
-static connectivity_watch *make_connectivity_watch(gpr_timespec s,
- int *counter) {
- connectivity_watch *o =
- static_cast<connectivity_watch *>(gpr_malloc(sizeof(*o)));
+static connectivity_watch* make_connectivity_watch(gpr_timespec s,
+ int* counter) {
+ connectivity_watch* o =
+ static_cast<connectivity_watch*>(gpr_malloc(sizeof(*o)));
o->deadline = s;
o->counter = counter;
return o;
}
-static void validate_connectivity_watch(void *p, bool success) {
- connectivity_watch *w = static_cast<connectivity_watch *>(p);
+static void validate_connectivity_watch(void* p, bool success) {
+ connectivity_watch* w = static_cast<connectivity_watch*>(p);
if (!success) {
GPR_ASSERT(gpr_time_cmp(gpr_now(w->deadline.clock_type), w->deadline) >= 0);
}
@@ -548,7 +550,7 @@ static void validate_connectivity_watch(void *p, bool success) {
gpr_free(w);
}
-static void free_non_null(void *p) {
+static void free_non_null(void* p) {
GPR_ASSERT(p != NULL);
gpr_free(p);
}
@@ -559,8 +561,8 @@ typedef enum { ROOT, CLIENT, SERVER, PENDING_SERVER } call_state_type;
typedef struct call_state {
call_state_type type;
- grpc_call *call;
- grpc_byte_buffer *recv_message;
+ grpc_call* call;
+ grpc_byte_buffer* recv_message;
grpc_status_code status;
grpc_metadata_array recv_initial_metadata;
grpc_metadata_array recv_trailing_metadata;
@@ -568,7 +570,7 @@ typedef struct call_state {
int cancelled;
int pending_ops;
grpc_call_details call_details;
- grpc_byte_buffer *send_message;
+ grpc_byte_buffer* send_message;
// starts at 0, individual flags from DONE_FLAG_xxx are set
// as different operations are completed
uint64_t done_flags;
@@ -576,21 +578,21 @@ typedef struct call_state {
// array of pointers to free later
size_t num_to_free;
size_t cap_to_free;
- void **to_free;
+ void** to_free;
// array of slices to unref
size_t num_slices_to_unref;
size_t cap_slices_to_unref;
- grpc_slice **slices_to_unref;
+ grpc_slice** slices_to_unref;
- struct call_state *next;
- struct call_state *prev;
+ struct call_state* next;
+ struct call_state* prev;
} call_state;
-static call_state *g_active_call;
+static call_state* g_active_call;
-static call_state *new_call(call_state *sibling, call_state_type type) {
- call_state *c = static_cast<call_state *>(gpr_malloc(sizeof(*c)));
+static call_state* new_call(call_state* sibling, call_state_type type) {
+ call_state* c = static_cast<call_state*>(gpr_malloc(sizeof(*c)));
memset(c, 0, sizeof(*c));
if (sibling != NULL) {
c->next = sibling;
@@ -603,8 +605,8 @@ static call_state *new_call(call_state *sibling, call_state_type type) {
return c;
}
-static call_state *maybe_delete_call_state(call_state *call) {
- call_state *next = call->next;
+static call_state* maybe_delete_call_state(call_state* call) {
+ call_state* next = call->next;
if (call->call != NULL) return next;
if (call->pending_ops != 0) return next;
@@ -636,34 +638,34 @@ static call_state *maybe_delete_call_state(call_state *call) {
return next;
}
-static void add_to_free(call_state *call, void *p) {
+static void add_to_free(call_state* call, void* p) {
if (call->num_to_free == call->cap_to_free) {
call->cap_to_free = GPR_MAX(8, 2 * call->cap_to_free);
- call->to_free = static_cast<void **>(
+ call->to_free = static_cast<void**>(
gpr_realloc(call->to_free, sizeof(*call->to_free) * call->cap_to_free));
}
call->to_free[call->num_to_free++] = p;
}
-static grpc_slice *add_slice_to_unref(call_state *call, grpc_slice s) {
+static grpc_slice* add_slice_to_unref(call_state* call, grpc_slice s) {
if (call->num_slices_to_unref == call->cap_slices_to_unref) {
call->cap_slices_to_unref = GPR_MAX(8, 2 * call->cap_slices_to_unref);
- call->slices_to_unref = static_cast<grpc_slice **>(gpr_realloc(
+ call->slices_to_unref = static_cast<grpc_slice**>(gpr_realloc(
call->slices_to_unref,
sizeof(*call->slices_to_unref) * call->cap_slices_to_unref));
}
call->slices_to_unref[call->num_slices_to_unref] =
- static_cast<grpc_slice *>(gpr_malloc(sizeof(grpc_slice)));
+ static_cast<grpc_slice*>(gpr_malloc(sizeof(grpc_slice)));
*call->slices_to_unref[call->num_slices_to_unref++] = s;
return call->slices_to_unref[call->num_slices_to_unref - 1];
}
-static void read_metadata(input_stream *inp, size_t *count,
- grpc_metadata **metadata, call_state *cs) {
+static void read_metadata(input_stream* inp, size_t* count,
+ grpc_metadata** metadata, call_state* cs) {
*count = next_byte(inp);
if (*count) {
*metadata =
- static_cast<grpc_metadata *>(gpr_malloc(*count * sizeof(**metadata)));
+ static_cast<grpc_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_like_slice(inp);
@@ -673,19 +675,19 @@ static void read_metadata(input_stream *inp, size_t *count,
add_slice_to_unref(cs, (*metadata)[i].value);
}
} else {
- *metadata = static_cast<grpc_metadata *>(gpr_malloc(1));
+ *metadata = static_cast<grpc_metadata*>(gpr_malloc(1));
}
add_to_free(cs, *metadata);
}
-static call_state *destroy_call(call_state *call) {
+static call_state* destroy_call(call_state* call) {
grpc_call_unref(call->call);
call->call = NULL;
return maybe_delete_call_state(call);
}
-static void finished_request_call(void *csp, bool success) {
- call_state *cs = static_cast<call_state *>(csp);
+static void finished_request_call(void* csp, bool success) {
+ call_state* cs = static_cast<call_state*>(csp);
GPR_ASSERT(cs->pending_ops > 0);
--cs->pending_ops;
if (success) {
@@ -697,12 +699,12 @@ static void finished_request_call(void *csp, bool success) {
}
typedef struct {
- call_state *cs;
+ call_state* cs;
uint8_t has_ops;
} batch_info;
-static void finished_batch(void *p, bool success) {
- batch_info *bi = static_cast<batch_info *>(p);
+static void finished_batch(void* p, bool success) {
+ batch_info* bi = static_cast<batch_info*>(p);
--bi->cs->pending_ops;
if ((bi->has_ops & (1u << GRPC_OP_RECV_MESSAGE)) &&
(bi->cs->done_flags & DONE_FLAG_CALL_CLOSED)) {
@@ -725,17 +727,17 @@ static void finished_batch(void *p, bool success) {
gpr_free(bi);
}
-static validator *make_finished_batch_validator(call_state *cs,
+static validator* make_finished_batch_validator(call_state* cs,
uint8_t has_ops) {
- batch_info *bi = static_cast<batch_info *>(gpr_malloc(sizeof(*bi)));
+ batch_info* bi = static_cast<batch_info*>(gpr_malloc(sizeof(*bi)));
bi->cs = cs;
bi->has_ops = has_ops;
return create_validator(finished_batch, bi);
}
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0);
- char *grpc_trace_fuzzer = gpr_getenv("GRPC_TRACE_FUZZER");
+ char* grpc_trace_fuzzer = gpr_getenv("GRPC_TRACE_FUZZER");
if (squelch && grpc_trace_fuzzer == NULL) gpr_set_log_function(dont_log);
gpr_free(grpc_trace_fuzzer);
input_stream inp = {data, data + size};
@@ -762,7 +764,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
g_active_call = new_call(NULL, ROOT);
g_resource_quota = grpc_resource_quota_create("api_fuzzer");
- grpc_completion_queue *cq = grpc_completion_queue_create_for_next(NULL);
+ grpc_completion_queue* cq = grpc_completion_queue_create_for_next(NULL);
while (!is_eof(&inp) || g_channel != NULL || g_server != NULL ||
pending_channel_watches > 0 || pending_pings > 0 ||
@@ -775,8 +777,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (g_server != NULL) {
if (!server_shutdown) {
grpc_server_shutdown_and_notify(
- g_server, cq, create_validator(assert_success_and_decrement,
- &pending_server_shutdowns));
+ g_server, cq,
+ create_validator(assert_success_and_decrement,
+ &pending_server_shutdowns));
server_shutdown = true;
pending_server_shutdowns++;
} else if (pending_server_shutdowns == 0) {
@@ -784,7 +787,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
g_server = NULL;
}
}
- call_state *s = g_active_call;
+ call_state* s = g_active_call;
do {
if (s->type != PENDING_SERVER && s->call != NULL) {
s = destroy_call(s);
@@ -809,7 +812,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
cq, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
switch (ev.type) {
case GRPC_OP_COMPLETE: {
- validator *v = static_cast<validator *>(ev.tag);
+ validator* v = static_cast<validator*>(ev.tag);
v->validate(v->arg, ev.success);
gpr_free(v);
break;
@@ -831,10 +834,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
// create an insecure channel
case 2: {
if (g_channel == NULL) {
- char *target = read_string(&inp, NULL);
- char *target_uri;
+ char* target = read_string(&inp, NULL);
+ char* target_uri;
gpr_asprintf(&target_uri, "dns:%s", target);
- grpc_channel_args *args = read_args(&inp);
+ grpc_channel_args* args = read_args(&inp);
g_channel = grpc_insecure_channel_create(target_uri, args, NULL);
GPR_ASSERT(g_channel != NULL);
{
@@ -862,7 +865,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
// bring up a server
case 4: {
if (g_server == NULL) {
- grpc_channel_args *args = read_args(&inp);
+ grpc_channel_args* args = read_args(&inp);
g_server = grpc_server_create(args, NULL);
GPR_ASSERT(g_server != NULL);
{
@@ -883,8 +886,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case 5: {
if (g_server != NULL) {
grpc_server_shutdown_and_notify(
- g_server, cq, create_validator(assert_success_and_decrement,
- &pending_server_shutdowns));
+ g_server, cq,
+ create_validator(assert_success_and_decrement,
+ &pending_server_shutdowns));
pending_server_shutdowns++;
server_shutdown = true;
} else {
@@ -951,7 +955,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case 10: {
bool ok = true;
if (g_channel == NULL) ok = false;
- grpc_call *parent_call = NULL;
+ grpc_call* parent_call = NULL;
if (g_active_call->type != ROOT) {
if (g_active_call->call == NULL || g_active_call->type == CLIENT) {
end(&inp);
@@ -970,7 +974,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
gpr_time_from_micros(read_uint32(&inp), GPR_TIMESPAN));
if (ok) {
- call_state *cs = new_call(g_active_call, CLIENT);
+ call_state* cs = new_call(g_active_call, CLIENT);
cs->call =
grpc_channel_create_call(g_channel, parent_call, propagation_mask,
cq, method, &host, deadline, NULL);
@@ -998,12 +1002,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
end(&inp);
break;
}
- grpc_op *ops =
- static_cast<grpc_op *>(gpr_malloc(sizeof(grpc_op) * num_ops));
+ grpc_op* ops =
+ static_cast<grpc_op*>(gpr_malloc(sizeof(grpc_op) * num_ops));
if (num_ops > 0) memset(ops, 0, sizeof(grpc_op) * num_ops);
bool ok = true;
size_t i;
- grpc_op *op;
+ grpc_op* op;
uint8_t has_ops = 0;
for (i = 0; i < num_ops; i++) {
op = &ops[i];
@@ -1078,7 +1082,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
op->flags = read_uint32(&inp);
}
if (ok) {
- validator *v = make_finished_batch_validator(g_active_call, has_ops);
+ validator* v = make_finished_batch_validator(g_active_call, has_ops);
g_active_call->pending_ops++;
grpc_call_error error =
grpc_call_start_batch(g_active_call->call, ops, num_ops, v, NULL);
@@ -1137,14 +1141,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
}
// enable a tracer
case 17: {
- char *tracer = read_string(&inp, NULL);
+ char* tracer = read_string(&inp, NULL);
grpc_tracer_set_enabled(tracer, 1);
gpr_free(tracer);
break;
}
// disable a tracer
case 18: {
- char *tracer = read_string(&inp, NULL);
+ char* tracer = read_string(&inp, NULL);
grpc_tracer_set_enabled(tracer, 0);
gpr_free(tracer);
break;
@@ -1155,9 +1159,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
end(&inp);
break;
}
- call_state *cs = new_call(g_active_call, PENDING_SERVER);
+ call_state* cs = new_call(g_active_call, PENDING_SERVER);
cs->pending_ops++;
- validator *v = create_validator(finished_request_call, cs);
+ validator* v = create_validator(finished_request_call, cs);
grpc_call_error error =
grpc_server_request_call(g_server, &cs->call, &cs->call_details,
&cs->recv_initial_metadata, cq, cq, v);
@@ -1186,11 +1190,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
// create a secure channel
case 22: {
if (g_channel == NULL) {
- char *target = read_string(&inp, NULL);
- char *target_uri;
+ char* target = read_string(&inp, NULL);
+ char* target_uri;
gpr_asprintf(&target_uri, "dns:%s", target);
- grpc_channel_args *args = read_args(&inp);
- grpc_channel_credentials *creds = read_channel_creds(&inp);
+ grpc_channel_args* args = read_args(&inp);
+ grpc_channel_credentials* creds = read_channel_creds(&inp);
g_channel = grpc_secure_channel_create(creds, target_uri, args, NULL);
GPR_ASSERT(g_channel != NULL);
{
diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc
index bea8ec88b9..d90ec40a27 100644
--- a/test/core/end2end/fuzzers/client_fuzzer.cc
+++ b/test/core/end2end/fuzzers/client_fuzzer.cc
@@ -33,11 +33,11 @@ bool leak_check = true;
static void discard_write(grpc_slice slice) {}
-static void *tag(int n) { return (void *)(uintptr_t)n; }
+static void* tag(int n) { return (void*)(uintptr_t)n; }
-static void dont_log(gpr_log_func_args *args) {}
+static void dont_log(gpr_log_func_args* args) {}
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0);
struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);
@@ -46,27 +46,27 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_executor_set_threading(&exec_ctx, false);
- grpc_resource_quota *resource_quota =
+ grpc_resource_quota* resource_quota =
grpc_resource_quota_create("client_fuzzer");
- grpc_endpoint *mock_endpoint =
+ grpc_endpoint* mock_endpoint =
grpc_mock_endpoint_create(discard_write, resource_quota);
grpc_resource_quota_unref_internal(&exec_ctx, resource_quota);
- grpc_completion_queue *cq = grpc_completion_queue_create_for_next(NULL);
- grpc_transport *transport =
+ grpc_completion_queue* cq = grpc_completion_queue_create_for_next(NULL);
+ grpc_transport* transport =
grpc_create_chttp2_transport(&exec_ctx, NULL, mock_endpoint, 1);
grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL);
- grpc_channel *channel = grpc_channel_create(
+ grpc_channel* channel = grpc_channel_create(
&exec_ctx, "test-target", NULL, GRPC_CLIENT_DIRECT_CHANNEL, transport);
grpc_slice host = grpc_slice_from_static_string("localhost");
- grpc_call *call = grpc_channel_create_call(
+ grpc_call* call = grpc_channel_create_call(
channel, NULL, 0, cq, grpc_slice_from_static_string("/foo"), &host,
gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array_init(&initial_metadata_recv);
- grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array_init(&trailing_metadata_recv);
grpc_status_code status;
@@ -74,7 +74,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_op ops[6];
memset(ops, 0, sizeof(ops));
- grpc_op *op = ops;
+ grpc_op* op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
op->flags = 0;
@@ -108,7 +108,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_mock_endpoint_put_read(
&exec_ctx, mock_endpoint,
- grpc_slice_from_copied_buffer((const char *)data, size));
+ grpc_slice_from_copied_buffer((const char*)data, size));
grpc_event ev;
while (1) {
diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc
index 36b16afc24..87bccc70cd 100644
--- a/test/core/end2end/fuzzers/server_fuzzer.cc
+++ b/test/core/end2end/fuzzers/server_fuzzer.cc
@@ -30,12 +30,12 @@ bool leak_check = true;
static void discard_write(grpc_slice slice) {}
-static void *tag(int n) { return (void *)(uintptr_t)n; }
-static int detag(void *p) { return (int)(uintptr_t)p; }
+static void* tag(int n) { return (void*)(uintptr_t)n; }
+static int detag(void* p) { return (int)(uintptr_t)p; }
-static void dont_log(gpr_log_func_args *args) {}
+static void dont_log(gpr_log_func_args* args) {}
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_test_only_set_slice_hash_seed(0);
struct grpc_memory_counters counters;
if (squelch) gpr_set_log_function(dont_log);
@@ -44,28 +44,28 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_executor_set_threading(&exec_ctx, false);
- grpc_resource_quota *resource_quota =
+ grpc_resource_quota* resource_quota =
grpc_resource_quota_create("server_fuzzer");
- grpc_endpoint *mock_endpoint =
+ grpc_endpoint* mock_endpoint =
grpc_mock_endpoint_create(discard_write, resource_quota);
grpc_resource_quota_unref_internal(&exec_ctx, resource_quota);
grpc_mock_endpoint_put_read(
&exec_ctx, mock_endpoint,
- grpc_slice_from_copied_buffer((const char *)data, size));
+ grpc_slice_from_copied_buffer((const char*)data, size));
- grpc_server *server = grpc_server_create(NULL, NULL);
- grpc_completion_queue *cq = grpc_completion_queue_create_for_next(NULL);
+ grpc_server* server = grpc_server_create(NULL, NULL);
+ grpc_completion_queue* cq = grpc_completion_queue_create_for_next(NULL);
grpc_server_register_completion_queue(server, cq, NULL);
// TODO(ctiller): add registered methods (one for POST, one for PUT)
// void *registered_method =
// grpc_server_register_method(server, "/reg", NULL, 0);
grpc_server_start(server);
- grpc_transport *transport =
+ grpc_transport* transport =
grpc_create_chttp2_transport(&exec_ctx, NULL, mock_endpoint, 0);
grpc_server_setup_transport(&exec_ctx, server, transport, NULL, NULL);
grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL);
- grpc_call *call1 = NULL;
+ grpc_call* call1 = NULL;
grpc_call_details call_details1;
grpc_metadata_array request_metadata1;
grpc_call_details_init(&call_details1);
diff --git a/test/core/end2end/goaway_server_test.cc b/test/core/end2end/goaway_server_test.cc
index c0d7fb81b5..12a966d05a 100644
--- a/test/core/end2end/goaway_server_test.cc
+++ b/test/core/end2end/goaway_server_test.cc
@@ -35,21 +35,21 @@
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
-static void *tag(intptr_t i) { return (void *)i; }
+static void* tag(intptr_t i) { return (void*)i; }
static gpr_mu g_mu;
static int g_resolve_port = -1;
-static void (*iomgr_resolve_address)(grpc_exec_ctx *exec_ctx, const char *addr,
- const char *default_port,
- grpc_pollset_set *interested_parties,
- grpc_closure *on_done,
- grpc_resolved_addresses **addresses);
-
-static grpc_ares_request *(*iomgr_dns_lookup_ares)(
- grpc_exec_ctx *exec_ctx, const char *dns_server, const char *addr,
- const char *default_port, grpc_pollset_set *interested_parties,
- grpc_closure *on_done, grpc_lb_addresses **addresses, bool check_grpclb,
- char **service_config_json);
+static void (*iomgr_resolve_address)(grpc_exec_ctx* exec_ctx, const char* addr,
+ const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addresses);
+
+static grpc_ares_request* (*iomgr_dns_lookup_ares)(
+ grpc_exec_ctx* exec_ctx, const char* dns_server, const char* addr,
+ const char* default_port, grpc_pollset_set* interested_parties,
+ grpc_closure* on_done, grpc_lb_addresses** addresses, bool check_grpclb,
+ char** service_config_json);
static void set_resolve_port(int port) {
gpr_mu_lock(&g_mu);
@@ -57,30 +57,29 @@ static void set_resolve_port(int port) {
gpr_mu_unlock(&g_mu);
}
-static void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr,
- const char *default_port,
- grpc_pollset_set *interested_parties,
- grpc_closure *on_done,
- grpc_resolved_addresses **addrs) {
+static void my_resolve_address(grpc_exec_ctx* exec_ctx, const char* addr,
+ const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addrs) {
if (0 != strcmp(addr, "test")) {
iomgr_resolve_address(exec_ctx, addr, default_port, interested_parties,
on_done, addrs);
return;
}
- grpc_error *error = GRPC_ERROR_NONE;
+ grpc_error* error = GRPC_ERROR_NONE;
gpr_mu_lock(&g_mu);
if (g_resolve_port < 0) {
gpr_mu_unlock(&g_mu);
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Forced Failure");
} else {
- *addrs =
- static_cast<grpc_resolved_addresses *>(gpr_malloc(sizeof(**addrs)));
+ *addrs = static_cast<grpc_resolved_addresses*>(gpr_malloc(sizeof(**addrs)));
(*addrs)->naddrs = 1;
- (*addrs)->addrs = static_cast<grpc_resolved_address *>(
+ (*addrs)->addrs = static_cast<grpc_resolved_address*>(
gpr_malloc(sizeof(*(*addrs)->addrs)));
memset((*addrs)->addrs, 0, sizeof(*(*addrs)->addrs));
- struct sockaddr_in *sa = (struct sockaddr_in *)(*addrs)->addrs[0].addr;
+ struct sockaddr_in* sa = (struct sockaddr_in*)(*addrs)->addrs[0].addr;
sa->sin_family = AF_INET;
sa->sin_addr.s_addr = htonl(0x7f000001);
sa->sin_port = htons((uint16_t)g_resolve_port);
@@ -90,25 +89,25 @@ static void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr,
GRPC_CLOSURE_SCHED(exec_ctx, on_done, error);
}
-static grpc_ares_request *my_dns_lookup_ares(
- grpc_exec_ctx *exec_ctx, const char *dns_server, const char *addr,
- const char *default_port, grpc_pollset_set *interested_parties,
- grpc_closure *on_done, grpc_lb_addresses **lb_addrs, bool check_grpclb,
- char **service_config_json) {
+static grpc_ares_request* my_dns_lookup_ares(
+ grpc_exec_ctx* exec_ctx, const char* dns_server, const char* addr,
+ const char* default_port, grpc_pollset_set* interested_parties,
+ grpc_closure* on_done, grpc_lb_addresses** lb_addrs, bool check_grpclb,
+ char** service_config_json) {
if (0 != strcmp(addr, "test")) {
return iomgr_dns_lookup_ares(exec_ctx, dns_server, addr, default_port,
interested_parties, on_done, lb_addrs,
check_grpclb, service_config_json);
}
- grpc_error *error = GRPC_ERROR_NONE;
+ grpc_error* error = GRPC_ERROR_NONE;
gpr_mu_lock(&g_mu);
if (g_resolve_port < 0) {
gpr_mu_unlock(&g_mu);
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Forced Failure");
} else {
*lb_addrs = grpc_lb_addresses_create(1, NULL);
- struct sockaddr_in *sa = static_cast<struct sockaddr_in *>(
+ struct sockaddr_in* sa = static_cast<struct sockaddr_in*>(
gpr_zalloc(sizeof(struct sockaddr_in)));
sa->sin_family = AF_INET;
sa->sin_addr.s_addr = htonl(0x7f000001);
@@ -122,11 +121,11 @@ static grpc_ares_request *my_dns_lookup_ares(
return NULL;
}
-int main(int argc, char **argv) {
- grpc_completion_queue *cq;
- cq_verifier *cqv;
+int main(int argc, char** argv) {
+ grpc_completion_queue* cq;
+ cq_verifier* cqv;
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_test_init(argc, argv);
@@ -165,22 +164,22 @@ int main(int argc, char **argv) {
int port1 = grpc_pick_unused_port_or_die();
int port2 = grpc_pick_unused_port_or_die();
- char *addr;
+ char* addr;
grpc_channel_args client_args;
grpc_arg arg_array[1];
arg_array[0].type = GRPC_ARG_INTEGER;
arg_array[0].key =
- const_cast<char *>("grpc.testing.fixed_reconnect_backoff_ms");
+ const_cast<char*>("grpc.testing.fixed_reconnect_backoff_ms");
arg_array[0].value.integer = 1000;
client_args.args = arg_array;
client_args.num_args = 1;
/* create a channel that picks first amongst the servers */
- grpc_channel *chan = grpc_insecure_channel_create("test", &client_args, NULL);
+ grpc_channel* chan = grpc_insecure_channel_create("test", &client_args, NULL);
/* and an initial call to them */
grpc_slice host = grpc_slice_from_static_string("127.0.0.1");
- grpc_call *call1 =
+ grpc_call* call1 =
grpc_channel_create_call(chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq,
grpc_slice_from_static_string("/foo"), &host,
grpc_timeout_seconds_to_deadline(20), NULL);
@@ -210,7 +209,7 @@ int main(int argc, char **argv) {
tag(0x102), NULL));
/* bring a server up on the first port */
- grpc_server *server1 = grpc_server_create(NULL, NULL);
+ grpc_server* server1 = grpc_server_create(NULL, NULL);
gpr_asprintf(&addr, "127.0.0.1:%d", port1);
grpc_server_add_insecure_http2_port(server1, addr);
grpc_server_register_completion_queue(server1, cq, NULL);
@@ -218,7 +217,7 @@ int main(int argc, char **argv) {
grpc_server_start(server1);
/* request a call to the server */
- grpc_call *server_call1;
+ grpc_call* server_call1;
GPR_ASSERT(GRPC_CALL_OK ==
grpc_server_request_call(server1, &server_call1, &request_details1,
&request_metadata1, cq, cq, tag(0x301)));
@@ -256,7 +255,7 @@ int main(int argc, char **argv) {
cq_verify_empty(cqv);
/* and a new call: should go through to server2 when we start it */
- grpc_call *call2 =
+ grpc_call* call2 =
grpc_channel_create_call(chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq,
grpc_slice_from_static_string("/foo"), &host,
grpc_timeout_seconds_to_deadline(20), NULL);
@@ -287,7 +286,7 @@ int main(int argc, char **argv) {
/* and bring up second server */
set_resolve_port(port2);
- grpc_server *server2 = grpc_server_create(NULL, NULL);
+ grpc_server* server2 = grpc_server_create(NULL, NULL);
gpr_asprintf(&addr, "127.0.0.1:%d", port2);
grpc_server_add_insecure_http2_port(server2, addr);
grpc_server_register_completion_queue(server2, cq, NULL);
@@ -295,7 +294,7 @@ int main(int argc, char **argv) {
grpc_server_start(server2);
/* request a call to the server */
- grpc_call *server_call2;
+ grpc_call* server_call2;
GPR_ASSERT(GRPC_CALL_OK ==
grpc_server_request_call(server2, &server_call2, &request_details2,
&request_metadata2, cq, cq, tag(0x401)));
diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc
index 515707af92..8994b63e5f 100644
--- a/test/core/end2end/h2_ssl_cert_test.cc
+++ b/test/core/end2end/h2_ssl_cert_test.cc
@@ -41,15 +41,15 @@ namespace grpc {
namespace testing {
typedef struct fullstack_secure_fixture_data {
- char *localaddr;
+ char* localaddr;
} fullstack_secure_fixture_data;
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
- grpc_channel_args *client_args, grpc_channel_args *server_args) {
+ grpc_channel_args* client_args, grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
int port = grpc_pick_unused_port_or_die();
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(
gpr_malloc(sizeof(fullstack_secure_fixture_data)));
memset(&f, 0, sizeof(f));
@@ -62,19 +62,19 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
return f;
}
-static void process_auth_failure(void *state, grpc_auth_context *ctx,
- const grpc_metadata *md, size_t md_count,
+static void process_auth_failure(void* state, grpc_auth_context* ctx,
+ const grpc_metadata* md, size_t md_count,
grpc_process_auth_metadata_done_cb cb,
- void *user_data) {
+ void* user_data) {
GPR_ASSERT(state == NULL);
cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL);
}
static void chttp2_init_client_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *client_args,
- grpc_channel_credentials *creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* client_args,
+ grpc_channel_credentials* creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
f->client =
grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL);
GPR_ASSERT(f->client != NULL);
@@ -82,10 +82,10 @@ static void chttp2_init_client_secure_fullstack(
}
static void chttp2_init_server_secure_fullstack(
- grpc_end2end_test_fixture *f, grpc_channel_args *server_args,
- grpc_server_credentials *server_creds) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+ grpc_end2end_test_fixture* f, grpc_channel_args* server_args,
+ grpc_server_credentials* server_creds) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
if (f->server) {
grpc_server_destroy(f->server);
}
@@ -97,14 +97,14 @@ static void chttp2_init_server_secure_fullstack(
grpc_server_start(f->server);
}
-void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) {
- fullstack_secure_fixture_data *ffd =
- static_cast<fullstack_secure_fixture_data *>(f->fixture_data);
+void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture* f) {
+ fullstack_secure_fixture_data* ffd =
+ static_cast<fullstack_secure_fixture_data*>(f->fixture_data);
gpr_free(ffd->localaddr);
gpr_free(ffd);
}
-static int fail_server_auth_check(grpc_channel_args *server_args) {
+static int fail_server_auth_check(grpc_channel_args* server_args) {
size_t i;
if (server_args == NULL) return 0;
for (i = 0; i < server_args->num_args; i++) {
@@ -124,7 +124,7 @@ static int fail_server_auth_check(grpc_channel_args *server_args) {
grpc_end2end_test_fixture * f, grpc_channel_args * server_args) { \
grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key, \
test_server1_cert}; \
- grpc_server_credentials *ssl_creds = \
+ grpc_server_credentials* ssl_creds = \
grpc_ssl_server_credentials_create_ex( \
test_root_cert, &pem_cert_key_pair, 1, REQUEST_TYPE, NULL); \
if (fail_server_auth_check(server_args)) { \
@@ -150,14 +150,14 @@ typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype;
#define CLIENT_INIT(cert_type) \
static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \
grpc_channel_args * client_args) { \
- grpc_channel_credentials *ssl_creds = NULL; \
+ grpc_channel_credentials* ssl_creds = NULL; \
grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \
test_self_signed_client_key, test_self_signed_client_cert}; \
grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = { \
test_signed_client_key, test_signed_client_cert}; \
grpc_ssl_pem_key_cert_pair bad_client_key_cert_pair = { \
test_self_signed_client_key, test_signed_client_cert}; \
- grpc_ssl_pem_key_cert_pair *key_cert_pair = NULL; \
+ grpc_ssl_pem_key_cert_pair* key_cert_pair = NULL; \
switch (cert_type) { \
case SELF_SIGNED: \
key_cert_pair = &self_signed_client_key_cert_pair; \
@@ -175,9 +175,9 @@ typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype;
grpc_ssl_credentials_create(test_root_cert, key_cert_pair, NULL); \
grpc_arg ssl_name_override = { \
GRPC_ARG_STRING, \
- const_cast<char *>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG), \
- {const_cast<char *>("foo.test.google.fr")}}; \
- grpc_channel_args *new_client_args = \
+ const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG), \
+ {const_cast<char*>("foo.test.google.fr")}}; \
+ grpc_channel_args* new_client_args = \
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \
chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \
{ \
@@ -197,15 +197,17 @@ CLIENT_INIT(BAD_CERT_PAIR)
typedef enum { SUCCESS, FAIL } test_result;
-#define SSL_TEST(request_type, cert_type, result) \
- { \
- {TEST_NAME(request_type, cert_type, result), \
- FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | \
- FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | \
- FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL, \
- chttp2_create_fixture_secure_fullstack, CLIENT_INIT_NAME(cert_type), \
- SERVER_INIT_NAME(request_type), chttp2_tear_down_secure_fullstack}, \
- result \
+#define SSL_TEST(request_type, cert_type, result) \
+ { \
+ {TEST_NAME(request_type, cert_type, result), \
+ FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | \
+ FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | \
+ FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL, \
+ chttp2_create_fixture_secure_fullstack, \
+ CLIENT_INIT_NAME(cert_type), \
+ SERVER_INIT_NAME(request_type), \
+ chttp2_tear_down_secure_fullstack}, \
+ result \
}
/* All test configurations */
@@ -254,7 +256,7 @@ static grpc_end2end_test_config_wrapper configs[] = {
BAD_CERT_PAIR, FAIL),
};
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static gpr_timespec n_seconds_time(int n) {
return grpc_timeout_seconds_to_deadline(n);
@@ -262,14 +264,14 @@ static gpr_timespec n_seconds_time(int n) {
static gpr_timespec five_seconds_time(void) { return n_seconds_time(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_time(), 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),
@@ -280,13 +282,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);
@@ -298,11 +300,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_fixture f,
test_result expected_result) {
- grpc_call *c;
+ grpc_call* c;
gpr_timespec deadline = five_seconds_time();
- 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_call_error error;
grpc_slice host = grpc_slice_from_static_string("foo.test.google.fr:1234");
@@ -356,10 +358,10 @@ INSTANTIATE_TEST_CASE_P(H2SslCert, H2SslCertTest, ::testing::ValuesIn(configs));
} // namespace testing
} // namespace grpc
-int main(int argc, char **argv) {
- FILE *roots_file;
+int main(int argc, char** argv) {
+ FILE* roots_file;
size_t roots_size = strlen(test_root_cert);
- char *roots_filename;
+ char* roots_filename;
grpc_test_init(argc, argv);
/* Set the SSL roots env var. */
diff --git a/test/core/end2end/invalid_call_argument_test.cc b/test/core/end2end/invalid_call_argument_test.cc
index ac704a6bc0..c310a0e9ba 100644
--- a/test/core/end2end/invalid_call_argument_test.cc
+++ b/test/core/end2end/invalid_call_argument_test.cc
@@ -30,22 +30,22 @@
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
-static void *tag(intptr_t i) { return (void *)i; }
+static void* tag(intptr_t i) { return (void*)i; }
struct test_state {
int is_client;
- grpc_channel *chan;
- grpc_call *call;
+ grpc_channel* chan;
+ grpc_call* call;
gpr_timespec deadline;
- grpc_completion_queue *cq;
- cq_verifier *cqv;
+ grpc_completion_queue* cq;
+ cq_verifier* cqv;
grpc_op ops[6];
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_status_code status;
grpc_slice details;
- grpc_call *server_call;
- grpc_server *server;
+ grpc_call* server_call;
+ grpc_server* server;
grpc_metadata_array server_initial_metadata_recv;
grpc_call_details call_details;
};
@@ -54,8 +54,8 @@ static struct test_state g_state;
static void prepare_test(int is_client) {
int port = grpc_pick_unused_port_or_die();
- char *server_hostport;
- grpc_op *op;
+ char* server_hostport;
+ grpc_op* op;
g_state.is_client = is_client;
grpc_metadata_array_init(&g_state.initial_metadata_recv);
grpc_metadata_array_init(&g_state.trailing_metadata_recv);
@@ -110,7 +110,7 @@ static void prepare_test(int is_client) {
}
static void cleanup_test() {
- grpc_completion_queue *shutdown_cq;
+ grpc_completion_queue* shutdown_cq;
grpc_call_unref(g_state.call);
cq_verifier_destroy(g_state.cqv);
grpc_channel_destroy(g_state.chan);
@@ -151,7 +151,7 @@ static void test_non_null_reserved_on_start_batch() {
static void test_non_null_reserved_on_op() {
gpr_log(GPR_INFO, "test_non_null_reserved_on_op");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
@@ -169,7 +169,7 @@ static void test_non_null_reserved_on_op() {
static void test_send_initial_metadata_more_than_once() {
gpr_log(GPR_INFO, "test_send_initial_metadata_more_than_once");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
@@ -199,7 +199,7 @@ static void test_send_initial_metadata_more_than_once() {
static void test_too_many_metadata() {
gpr_log(GPR_INFO, "test_too_many_metadata");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
@@ -217,7 +217,7 @@ static void test_too_many_metadata() {
static void test_send_null_message() {
gpr_log(GPR_INFO, "test_send_null_message");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
@@ -240,10 +240,10 @@ static void test_send_null_message() {
static void test_send_messages_at_the_same_time() {
gpr_log(GPR_INFO, "test_send_messages_at_the_same_time");
- grpc_op *op;
+ grpc_op* op;
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);
prepare_test(1);
op = g_state.ops;
@@ -258,7 +258,7 @@ static void test_send_messages_at_the_same_time() {
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
- op->data.send_message.send_message = static_cast<grpc_byte_buffer *>(tag(2));
+ op->data.send_message.send_message = static_cast<grpc_byte_buffer*>(tag(2));
op->flags = 0;
op->reserved = NULL;
op++;
@@ -272,7 +272,7 @@ static void test_send_messages_at_the_same_time() {
static void test_send_server_status_from_client() {
gpr_log(GPR_INFO, "test_send_server_status_from_client");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
@@ -293,7 +293,7 @@ static void test_send_server_status_from_client() {
static void test_receive_initial_metadata_twice_at_client() {
gpr_log(GPR_INFO, "test_receive_initial_metadata_twice_at_client");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
@@ -323,8 +323,8 @@ static void test_receive_initial_metadata_twice_at_client() {
static void test_receive_message_with_invalid_flags() {
gpr_log(GPR_INFO, "test_receive_message_with_invalid_flags");
- grpc_op *op;
- grpc_byte_buffer *payload = NULL;
+ grpc_op* op;
+ grpc_byte_buffer* payload = NULL;
prepare_test(1);
op = g_state.ops;
op->op = GRPC_OP_RECV_MESSAGE;
@@ -341,8 +341,8 @@ static void test_receive_message_with_invalid_flags() {
static void test_receive_two_messages_at_the_same_time() {
gpr_log(GPR_INFO, "test_receive_two_messages_at_the_same_time");
- grpc_op *op;
- grpc_byte_buffer *payload = NULL;
+ grpc_op* op;
+ grpc_byte_buffer* payload = NULL;
prepare_test(1);
op = g_state.ops;
op->op = GRPC_OP_RECV_MESSAGE;
@@ -364,7 +364,7 @@ static void test_receive_two_messages_at_the_same_time() {
static void test_recv_close_on_server_from_client() {
gpr_log(GPR_INFO, "test_recv_close_on_server_from_client");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
@@ -382,7 +382,7 @@ static void test_recv_close_on_server_from_client() {
static void test_recv_status_on_client_twice() {
gpr_log(GPR_INFO, "test_recv_status_on_client_twice");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
@@ -417,7 +417,7 @@ static void test_recv_status_on_client_twice() {
static void test_send_close_from_client_on_server() {
gpr_log(GPR_INFO, "test_send_close_from_client_on_server");
- grpc_op *op;
+ grpc_op* op;
prepare_test(0);
op = g_state.ops;
@@ -434,7 +434,7 @@ static void test_send_close_from_client_on_server() {
static void test_recv_status_on_client_from_server() {
gpr_log(GPR_INFO, "test_recv_status_on_client_from_server");
- grpc_op *op;
+ grpc_op* op;
prepare_test(0);
op = g_state.ops;
@@ -455,7 +455,7 @@ static void test_recv_status_on_client_from_server() {
static void test_send_status_from_server_with_invalid_flags() {
gpr_log(GPR_INFO, "test_send_status_from_server_with_invalid_flags");
- grpc_op *op;
+ grpc_op* op;
prepare_test(0);
op = g_state.ops;
@@ -476,7 +476,7 @@ static void test_send_status_from_server_with_invalid_flags() {
static void test_too_many_trailing_metadata() {
gpr_log(GPR_INFO, "test_too_many_trailing_metadata");
- grpc_op *op;
+ grpc_op* op;
prepare_test(0);
op = g_state.ops;
@@ -498,7 +498,7 @@ static void test_too_many_trailing_metadata() {
static void test_send_server_status_twice() {
gpr_log(GPR_INFO, "test_send_server_status_twice");
- grpc_op *op;
+ grpc_op* op;
prepare_test(0);
op = g_state.ops;
@@ -526,7 +526,7 @@ static void test_send_server_status_twice() {
static void test_recv_close_on_server_with_invalid_flags() {
gpr_log(GPR_INFO, "test_recv_close_on_server_with_invalid_flags");
- grpc_op *op;
+ grpc_op* op;
prepare_test(0);
op = g_state.ops;
@@ -544,7 +544,7 @@ static void test_recv_close_on_server_with_invalid_flags() {
static void test_recv_close_on_server_twice() {
gpr_log(GPR_INFO, "test_recv_close_on_server_twice");
- grpc_op *op;
+ grpc_op* op;
prepare_test(0);
op = g_state.ops;
@@ -571,7 +571,7 @@ static void test_invalid_initial_metadata_reserved_key() {
metadata.key = grpc_slice_from_static_string(":start_with_colon");
metadata.value = grpc_slice_from_static_string("value");
- grpc_op *op;
+ grpc_op* op;
prepare_test(1);
op = g_state.ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
@@ -586,7 +586,7 @@ static void test_invalid_initial_metadata_reserved_key() {
cleanup_test();
}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_init();
test_invalid_initial_metadata_reserved_key();
diff --git a/test/core/end2end/multiple_server_queues_test.cc b/test/core/end2end/multiple_server_queues_test.cc
index f231c62dd0..8036ca54b2 100644
--- a/test/core/end2end/multiple_server_queues_test.cc
+++ b/test/core/end2end/multiple_server_queues_test.cc
@@ -19,13 +19,13 @@
#include <grpc/grpc.h>
#include "test/core/util/test_config.h"
-int main(int argc, char **argv) {
- grpc_completion_queue *cq1;
- grpc_completion_queue *cq2;
- grpc_completion_queue *cq3;
+int main(int argc, char** argv) {
+ grpc_completion_queue* cq1;
+ grpc_completion_queue* cq2;
+ grpc_completion_queue* cq3;
grpc_completion_queue_attributes attr;
- grpc_server *server;
+ grpc_server* server;
grpc_test_init(argc, argv);
grpc_init();
diff --git a/test/core/end2end/no_server_test.cc b/test/core/end2end/no_server_test.cc
index 962499bb4f..a69b7bc8d6 100644
--- a/test/core/end2end/no_server_test.cc
+++ b/test/core/end2end/no_server_test.cc
@@ -25,16 +25,16 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/util/test_config.h"
-static void *tag(intptr_t i) { return (void *)i; }
+static void* tag(intptr_t i) { return (void*)i; }
-int main(int argc, char **argv) {
- grpc_channel *chan;
- grpc_call *call;
+int main(int argc, char** argv) {
+ grpc_channel* chan;
+ grpc_call* call;
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(2);
- grpc_completion_queue *cq;
- cq_verifier *cqv;
+ grpc_completion_queue* cq;
+ cq_verifier* cqv;
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_metadata_array trailing_metadata_recv;
grpc_status_code status;
grpc_slice details;
diff --git a/test/core/end2end/tests/authority_not_supported.cc b/test/core/end2end/tests/authority_not_supported.cc
index b54d6d0d6f..62fb02ab56 100644
--- a/test/core/end2end/tests/authority_not_supported.cc
+++ b/test/core/end2end/tests/authority_not_supported.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -86,10 +86,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Request/response with metadata and payload.*/
static void test_with_authority_header(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);
grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"),
grpc_slice_from_static_string("val1"),
@@ -101,12 +101,12 @@ static void test_with_authority_header(grpc_end2end_test_config config) {
{{NULL, NULL, NULL, NULL}}}};
grpc_end2end_test_fixture f =
begin_test(config, "test_with_authority_header", 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_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
diff --git a/test/core/end2end/tests/bad_hostname.cc b/test/core/end2end/tests/bad_hostname.cc
index 32093f2ecf..c54cb8ed34 100644
--- a/test/core/end2end/tests/bad_hostname.cc
+++ b/test/core/end2end/tests/bad_hostname.cc
@@ -30,12 +30,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -87,10 +87,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void simple_request_body(grpc_end2end_test_fixture f) {
- grpc_call *c;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ 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;
diff --git a/test/core/end2end/tests/bad_ping.cc b/test/core/end2end/tests/bad_ping.cc
index 50e02ed720..648061587c 100644
--- a/test/core/end2end/tests/bad_ping.cc
+++ b/test/core/end2end/tests/bad_ping.cc
@@ -31,9 +31,9 @@
#define MAX_PING_STRIKES 1
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
-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, grpc_timeout_seconds_to_deadline(5),
@@ -41,19 +41,19 @@ static void drain_cq(grpc_completion_queue *cq) {
} 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_destroy(f->server);
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);
@@ -65,28 +65,28 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void test_bad_ping(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = config.create_fixture(NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_arg client_a[3];
client_a[0].type = GRPC_ARG_INTEGER;
client_a[0].key =
- const_cast<char *>(GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS);
+ const_cast<char*>(GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS);
client_a[0].value.integer = 10;
client_a[1].type = GRPC_ARG_INTEGER;
- client_a[1].key = const_cast<char *>(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA);
+ client_a[1].key = const_cast<char*>(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA);
client_a[1].value.integer = 0;
client_a[2].type = GRPC_ARG_INTEGER;
- client_a[2].key = const_cast<char *>(GRPC_ARG_HTTP2_BDP_PROBE);
+ client_a[2].key = const_cast<char*>(GRPC_ARG_HTTP2_BDP_PROBE);
client_a[2].value.integer = 0;
grpc_arg server_a[3];
server_a[0].type = GRPC_ARG_INTEGER;
server_a[0].key =
- const_cast<char *>(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS);
+ const_cast<char*>(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS);
server_a[0].value.integer = 300000 /* 5 minutes */;
server_a[1].type = GRPC_ARG_INTEGER;
- server_a[1].key = const_cast<char *>(GRPC_ARG_HTTP2_MAX_PING_STRIKES);
+ server_a[1].key = const_cast<char*>(GRPC_ARG_HTTP2_MAX_PING_STRIKES);
server_a[1].value.integer = MAX_PING_STRIKES;
server_a[2].type = GRPC_ARG_INTEGER;
- server_a[2].key = const_cast<char *>(GRPC_ARG_HTTP2_BDP_PROBE);
+ server_a[2].key = const_cast<char*>(GRPC_ARG_HTTP2_BDP_PROBE);
server_a[2].value.integer = 0;
grpc_channel_args client_args = {GPR_ARRAY_SIZE(client_a), client_a};
grpc_channel_args server_args = {GPR_ARRAY_SIZE(server_a), server_a};
@@ -94,11 +94,11 @@ static void test_bad_ping(grpc_end2end_test_config config) {
config.init_client(&f, &client_args);
config.init_server(&f, &server_args);
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
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;
diff --git a/test/core/end2end/tests/binary_metadata.cc b/test/core/end2end/tests/binary_metadata.cc
index e949daee1d..52f0c70862 100644
--- a/test/core/end2end/tests/binary_metadata.cc
+++ b/test/core/end2end/tests/binary_metadata.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -87,15 +87,15 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Request/response with metadata and payload.*/
static void test_request_response_with_metadata_and_payload(
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_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
grpc_metadata meta_c[2] = {
{grpc_slice_from_static_string("key1-bin"),
@@ -121,14 +121,14 @@ static void test_request_response_with_metadata_and_payload(
{{NULL, NULL, NULL, NULL}}}};
grpc_end2end_test_fixture f = begin_test(
config, "test_request_response_with_metadata_and_payload", 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/call_creds.cc b/test/core/end2end/tests/call_creds.cc
index dfe6d19160..fc550b7733 100644
--- a/test/core/end2end/tests/call_creds.cc
+++ b/test/core/end2end/tests/call_creds.cc
@@ -38,10 +38,10 @@ static const char overridden_iam_selector[] = "overridden_selector";
typedef enum { NONE, OVERRIDE, DESTROY } override_mode;
-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,
+ const char* test_name,
int fail_server_auth_check) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name);
@@ -50,7 +50,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
if (fail_server_auth_check) {
grpc_arg fail_auth_arg = {
GRPC_ARG_STRING,
- const_cast<char *>(FAIL_AUTH_CHECK_SERVER_ARG_NAME),
+ const_cast<char*>(FAIL_AUTH_CHECK_SERVER_ARG_NAME),
{NULL}};
grpc_channel_args args;
args.num_args = 1;
@@ -70,14 +70,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),
@@ -88,13 +88,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);
@@ -104,8 +104,8 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->shutdown_cq);
}
-static void print_auth_context(int is_client, const grpc_auth_context *ctx) {
- const grpc_auth_property *p;
+static void print_auth_context(int is_client, const grpc_auth_context* ctx) {
+ const grpc_auth_property* p;
grpc_auth_property_iterator it;
gpr_log(GPR_INFO, "%s peer:", is_client ? "client" : "server");
gpr_log(GPR_INFO, "\tauthenticated: %s",
@@ -122,35 +122,35 @@ static void print_auth_context(int is_client, const grpc_auth_context *ctx) {
}
static void request_response_with_payload_and_call_creds(
- const char *test_name, grpc_end2end_test_config config,
+ const char* test_name, grpc_end2end_test_config config,
override_mode mode) {
- 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_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
grpc_end2end_test_fixture f;
- cq_verifier *cqv;
+ cq_verifier* cqv;
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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- grpc_call_credentials *creds = NULL;
- grpc_auth_context *s_auth_context = NULL;
- grpc_auth_context *c_auth_context = NULL;
+ grpc_call_credentials* creds = NULL;
+ grpc_auth_context* s_auth_context = NULL;
+ grpc_auth_context* c_auth_context = NULL;
f = begin_test(config, test_name, 0);
cqv = cq_verifier_create(f.cq);
@@ -371,11 +371,11 @@ static void test_request_response_with_payload_and_deleted_call_creds(
static void test_request_with_server_rejecting_client_creds(
grpc_end2end_test_config config) {
grpc_op ops[6];
- grpc_op *op;
- grpc_call *c;
+ grpc_op* op;
+ grpc_call* c;
grpc_end2end_test_fixture f;
gpr_timespec deadline = five_seconds_from_now();
- cq_verifier *cqv;
+ cq_verifier* cqv;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -383,12 +383,12 @@ static void test_request_with_server_rejecting_client_creds(
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
- grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
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_call_credentials *creds;
+ grpc_call_credentials* creds;
f = begin_test(config, "test_request_with_server_rejecting_client_creds", 1);
cqv = cq_verifier_create(f.cq);
diff --git a/test/core/end2end/tests/cancel_after_accept.cc b/test/core/end2end/tests/cancel_after_accept.cc
index 58e807b83b..e2ad5bd721 100644
--- a/test/core/end2end/tests/cancel_after_accept.cc
+++ b/test/core/end2end/tests/cancel_after_accept.cc
@@ -35,14 +35,14 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
- const char *test_name,
+ const char* test_name,
cancellation_mode mode,
bool use_service_config,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s/%s/%s", test_name, config.name,
mode.name, use_service_config ? "service_config" : "client_api");
@@ -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);
@@ -99,9 +99,9 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
cancellation_mode mode,
bool use_service_config) {
grpc_op ops[6];
- grpc_op *op;
- grpc_call *c;
- grpc_call *s;
+ grpc_op* op;
+ grpc_call* c;
+ grpc_call* s;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -109,28 +109,29 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
- grpc_byte_buffer *request_payload_recv = NULL;
- grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
grpc_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
int was_cancelled = 2;
- grpc_channel_args *args = NULL;
+ grpc_channel_args* args = NULL;
if (use_service_config) {
grpc_arg arg;
arg.type = GRPC_ARG_STRING;
- arg.key = const_cast<char *>(GRPC_ARG_SERVICE_CONFIG);
- arg.value.string = const_cast<char *>(
+ arg.key = const_cast<char*>(GRPC_ARG_SERVICE_CONFIG);
+ arg.value.string = const_cast<char*>(
"{\n"
" \"methodConfig\": [ {\n"
" \"name\": [\n"
- " { \"service\": \"service\", \"method\": \"method\" }\n"
+ " { \"service\": \"service\", \"method\": \"method\" },\n"
+ " { \"service\": \"unused\" }\n"
" ],\n"
" \"timeout\": \"5s\"\n"
" } ]\n"
@@ -140,7 +141,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
grpc_end2end_test_fixture f = begin_test(config, "cancel_after_accept", mode,
use_service_config, args, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
gpr_timespec deadline = use_service_config
? gpr_inf_future(GPR_CLOCK_MONOTONIC)
diff --git a/test/core/end2end/tests/cancel_after_client_done.cc b/test/core/end2end/tests/cancel_after_client_done.cc
index 0e2a751d83..90db7f51b2 100644
--- a/test/core/end2end/tests/cancel_after_client_done.cc
+++ b/test/core/end2end/tests/cancel_after_client_done.cc
@@ -29,13 +29,13 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
- const char *test_name,
+ const char* test_name,
cancellation_mode mode,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s/%s", test_name, config.name,
mode.name);
@@ -53,14 +53,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),
@@ -71,13 +71,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);
@@ -91,12 +91,12 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void test_cancel_after_accept_and_writes_closed(
grpc_end2end_test_config config, cancellation_mode mode) {
grpc_op ops[6];
- grpc_op *op;
- grpc_call *c;
- grpc_call *s;
+ grpc_op* op;
+ grpc_call* c;
+ grpc_call* s;
grpc_end2end_test_fixture f = begin_test(
config, "test_cancel_after_accept_and_writes_closed", mode, NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -104,15 +104,15 @@ static void test_cancel_after_accept_and_writes_closed(
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
- grpc_byte_buffer *request_payload_recv = NULL;
- grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
grpc_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
int was_cancelled = 2;
diff --git a/test/core/end2end/tests/cancel_after_invoke.cc b/test/core/end2end/tests/cancel_after_invoke.cc
index aad9fdbf94..7f0c4e7af9 100644
--- a/test/core/end2end/tests/cancel_after_invoke.cc
+++ b/test/core/end2end/tests/cancel_after_invoke.cc
@@ -29,14 +29,14 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
- const char *test_name,
+ const char* test_name,
cancellation_mode mode,
size_t test_ops,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s/%s [%" PRIdPTR " ops]", test_name,
config.name, mode.name, test_ops);
@@ -54,14 +54,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->cq, tag(1000));
grpc_event ev = grpc_completion_queue_next(
@@ -72,13 +72,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);
@@ -92,11 +92,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void test_cancel_after_invoke(grpc_end2end_test_config config,
cancellation_mode mode, size_t test_ops) {
grpc_op ops[6];
- grpc_op *op;
- grpc_call *c;
+ grpc_op* op;
+ grpc_call* c;
grpc_end2end_test_fixture f = begin_test(config, "test_cancel_after_invoke",
mode, test_ops, NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -104,10 +104,10 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
- grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
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();
diff --git a/test/core/end2end/tests/cancel_after_round_trip.cc b/test/core/end2end/tests/cancel_after_round_trip.cc
index 202eeb5fb6..35b5214fac 100644
--- a/test/core/end2end/tests/cancel_after_round_trip.cc
+++ b/test/core/end2end/tests/cancel_after_round_trip.cc
@@ -35,14 +35,14 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
- const char *test_name,
+ const char* test_name,
cancellation_mode mode,
bool use_service_config,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s/%s/%s", test_name, config.name,
mode.name, use_service_config ? "service_config" : "client_api");
@@ -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);
@@ -99,9 +99,9 @@ static void test_cancel_after_round_trip(grpc_end2end_test_config config,
cancellation_mode mode,
bool use_service_config) {
grpc_op ops[6];
- grpc_op *op;
- grpc_call *c;
- grpc_call *s;
+ grpc_op* op;
+ grpc_call* c;
+ grpc_call* s;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -109,26 +109,26 @@ static void test_cancel_after_round_trip(grpc_end2end_test_config config,
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
- grpc_byte_buffer *request_payload_recv = NULL;
- grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
grpc_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload1 =
+ grpc_byte_buffer* response_payload1 =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- grpc_byte_buffer *response_payload2 =
+ grpc_byte_buffer* response_payload2 =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
int was_cancelled = 2;
- grpc_channel_args *args = NULL;
+ grpc_channel_args* args = NULL;
if (use_service_config) {
grpc_arg arg;
arg.type = GRPC_ARG_STRING;
- arg.key = const_cast<char *>(GRPC_ARG_SERVICE_CONFIG);
- arg.value.string = const_cast<char *>(
+ arg.key = const_cast<char*>(GRPC_ARG_SERVICE_CONFIG);
+ arg.value.string = const_cast<char*>(
"{\n"
" \"methodConfig\": [ {\n"
" \"name\": [\n"
@@ -142,7 +142,7 @@ static void test_cancel_after_round_trip(grpc_end2end_test_config config,
grpc_end2end_test_fixture f = begin_test(
config, "cancel_after_round_trip", mode, use_service_config, args, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
gpr_timespec deadline = use_service_config
? gpr_inf_future(GPR_CLOCK_MONOTONIC)
diff --git a/test/core/end2end/tests/cancel_before_invoke.cc b/test/core/end2end/tests/cancel_before_invoke.cc
index 397e8b8ba6..9504aae5e6 100644
--- a/test/core/end2end/tests/cancel_before_invoke.cc
+++ b/test/core/end2end/tests/cancel_before_invoke.cc
@@ -28,13 +28,13 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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,
+ const char* test_name,
size_t num_ops,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s [%" PRIdPTR " ops]", test_name,
config.name, num_ops);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -90,11 +90,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void test_cancel_before_invoke(grpc_end2end_test_config config,
size_t test_ops) {
grpc_op ops[6];
- grpc_op *op;
- grpc_call *c;
+ grpc_op* op;
+ grpc_call* c;
grpc_end2end_test_fixture f =
begin_test(config, "cancel_before_invoke", test_ops, NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -102,10 +102,10 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
- grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
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();
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.cc b/test/core/end2end/tests/cancel_in_a_vacuum.cc
index cd9551bef9..090ee2fbb2 100644
--- a/test/core/end2end/tests/cancel_in_a_vacuum.cc
+++ b/test/core/end2end/tests/cancel_in_a_vacuum.cc
@@ -29,13 +29,13 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
- const char *test_name,
+ const char* test_name,
cancellation_mode mode,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s/%s", test_name, config.name,
mode.name);
@@ -53,14 +53,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),
@@ -71,13 +71,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);
@@ -90,10 +90,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Cancel and do nothing */
static void test_cancel_in_a_vacuum(grpc_end2end_test_config config,
cancellation_mode mode) {
- grpc_call *c;
+ grpc_call* c;
grpc_end2end_test_fixture f =
begin_test(config, "test_cancel_in_a_vacuum", mode, NULL, NULL);
- cq_verifier *v_client = cq_verifier_create(f.cq);
+ cq_verifier* v_client = cq_verifier_create(f.cq);
gpr_timespec deadline = five_seconds_from_now();
c = grpc_channel_create_call(
diff --git a/test/core/end2end/tests/cancel_test_helpers.h b/test/core/end2end/tests/cancel_test_helpers.h
index d85616b153..477d19929d 100644
--- a/test/core/end2end/tests/cancel_test_helpers.h
+++ b/test/core/end2end/tests/cancel_test_helpers.h
@@ -20,13 +20,13 @@
#define GRPC_TEST_CORE_END2END_TESTS_CANCEL_TEST_HELPERS_H
typedef struct {
- const char *name;
- grpc_call_error (*initiate_cancel)(grpc_call *call, void *reserved);
+ const char* name;
+ grpc_call_error (*initiate_cancel)(grpc_call* call, void* reserved);
grpc_status_code expect_status;
- const char *expect_details;
+ const char* expect_details;
} cancellation_mode;
-static grpc_call_error wait_for_deadline(grpc_call *call, void *reserved) {
+static grpc_call_error wait_for_deadline(grpc_call* call, void* reserved) {
(void)reserved;
return GRPC_CALL_OK;
}
diff --git a/test/core/end2end/tests/cancel_with_status.cc b/test/core/end2end/tests/cancel_with_status.cc
index ab8c4f4187..bc3c4c3ebd 100644
--- a/test/core/end2end/tests/cancel_with_status.cc
+++ b/test/core/end2end/tests/cancel_with_status.cc
@@ -31,13 +31,13 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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,
+ const char* test_name,
size_t num_ops,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args) {
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s [%" PRIdPTR " ops]", test_name,
config.name, num_ops);
@@ -55,14 +55,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->cq, tag(1000));
grpc_event ev = grpc_completion_queue_next(
@@ -73,13 +73,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);
@@ -91,10 +91,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f, size_t num_ops) {
- grpc_call *c;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ 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_status_code status;
@@ -141,9 +141,9 @@ static void simple_request_body(grpc_end2end_test_config config,
error = grpc_call_start_batch(c, ops, num_ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- char *dynamic_string = gpr_strdup("xyz");
+ char* dynamic_string = gpr_strdup("xyz");
grpc_call_cancel_with_status(c, GRPC_STATUS_UNIMPLEMENTED,
- (const char *)dynamic_string, NULL);
+ (const char*)dynamic_string, NULL);
// The API of \a description allows for it to be a dynamic/non-const
// string, test this guarantee.
gpr_free(dynamic_string);
diff --git a/test/core/end2end/tests/compressed_payload.cc b/test/core/end2end/tests/compressed_payload.cc
index ba03773036..b5fc1898b5 100644
--- a/test/core/end2end/tests/compressed_payload.cc
+++ b/test/core/end2end/tests/compressed_payload.cc
@@ -36,12 +36,12 @@
#include "src/core/lib/transport/static_metadata.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -58,14 +58,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),
@@ -76,13 +76,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);
@@ -93,30 +93,30 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void request_for_disabled_algorithm(
- grpc_end2end_test_config config, const char *test_name,
+ grpc_end2end_test_config config, const char* test_name,
uint32_t send_flags_bitmask,
grpc_compression_algorithm algorithm_to_disable,
grpc_compression_algorithm requested_client_compression_algorithm,
- grpc_status_code expected_error, grpc_metadata *client_metadata) {
- grpc_call *c;
- grpc_call *s;
+ grpc_status_code expected_error, grpc_metadata* client_metadata) {
+ grpc_call* c;
+ grpc_call* s;
grpc_slice request_payload_slice;
- grpc_byte_buffer *request_payload;
- grpc_channel_args *client_args;
- grpc_channel_args *server_args;
+ grpc_byte_buffer* request_payload;
+ grpc_channel_args* client_args;
+ grpc_channel_args* server_args;
grpc_end2end_test_fixture f;
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;
grpc_slice details;
int was_cancelled = 2;
- cq_verifier *cqv;
+ cq_verifier* cqv;
char str[1024];
memset(str, 'x', 1023);
@@ -229,9 +229,9 @@ static void request_for_disabled_algorithm(
/* with a certain error */
GPR_ASSERT(status == expected_error);
- const char *algo_name = NULL;
+ const char* algo_name = NULL;
GPR_ASSERT(grpc_compression_algorithm_name(algorithm_to_disable, &algo_name));
- char *expected_details = NULL;
+ char* expected_details = NULL;
gpr_asprintf(&expected_details, "Compression algorithm '%s' is disabled.",
algo_name);
/* and we expect a specific reason for it */
@@ -268,36 +268,36 @@ static void request_for_disabled_algorithm(
}
static void request_with_payload_template(
- grpc_end2end_test_config config, const char *test_name,
+ grpc_end2end_test_config config, const char* test_name,
uint32_t client_send_flags_bitmask,
grpc_compression_algorithm default_client_channel_compression_algorithm,
grpc_compression_algorithm default_server_channel_compression_algorithm,
grpc_compression_algorithm expected_algorithm_from_client,
grpc_compression_algorithm expected_algorithm_from_server,
- grpc_metadata *client_init_metadata, bool set_server_level,
+ grpc_metadata* client_init_metadata, bool set_server_level,
grpc_compression_level server_compression_level,
bool send_message_before_initial_metadata) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_slice request_payload_slice;
- grpc_byte_buffer *request_payload = NULL;
- grpc_channel_args *client_args;
- grpc_channel_args *server_args;
+ grpc_byte_buffer* request_payload = NULL;
+ grpc_channel_args* client_args;
+ grpc_channel_args* server_args;
grpc_end2end_test_fixture f;
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 *response_payload;
- grpc_byte_buffer *response_payload_recv;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload;
+ grpc_byte_buffer* response_payload_recv;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- cq_verifier *cqv;
+ cq_verifier* cqv;
char request_str[1024];
char response_str[1024];
diff --git a/test/core/end2end/tests/connectivity.cc b/test/core/end2end/tests/connectivity.cc
index 2cba25965a..4f302d11dc 100644
--- a/test/core/end2end/tests/connectivity.cc
+++ b/test/core/end2end/tests/connectivity.cc
@@ -25,18 +25,18 @@
#include "test/core/end2end/cq_verifier.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
typedef struct {
gpr_event started;
- grpc_channel *channel;
- grpc_completion_queue *cq;
+ grpc_channel* channel;
+ grpc_completion_queue* cq;
} child_events;
-static void child_thread(void *arg) {
- child_events *ce = (child_events *)arg;
+static void child_thread(void* arg) {
+ child_events* ce = (child_events*)arg;
grpc_event ev;
- gpr_event_set(&ce->started, (void *)1);
+ gpr_event_set(&ce->started, (void*)1);
gpr_log(GPR_DEBUG, "verifying");
ev = grpc_completion_queue_next(ce->cq, gpr_inf_future(GPR_CLOCK_MONOTONIC),
NULL);
@@ -48,7 +48,7 @@ static void child_thread(void *arg) {
static void test_connectivity(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = config.create_fixture(NULL, NULL);
grpc_connectivity_state state;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
child_events ce;
gpr_thd_options thdopt = gpr_thd_options_default();
gpr_thd_id thdid;
@@ -57,7 +57,7 @@ static void test_connectivity(grpc_end2end_test_config config) {
grpc_arg arg_array[1];
arg_array[0].type = GRPC_ARG_INTEGER;
arg_array[0].key =
- const_cast<char *>("grpc.testing.fixed_reconnect_backoff_ms");
+ const_cast<char*>("grpc.testing.fixed_reconnect_backoff_ms");
arg_array[0].value.integer = 1000;
client_args.args = arg_array;
client_args.num_args = 1;
diff --git a/test/core/end2end/tests/default_host.cc b/test/core/end2end/tests/default_host.cc
index d1db9b342a..166f22aec9 100644
--- a/test/core/end2end/tests/default_host.cc
+++ b/test/core/end2end/tests/default_host.cc
@@ -30,12 +30,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -87,11 +87,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void simple_request_body(grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -100,7 +100,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- char *peer;
+ char* peer;
gpr_timespec deadline = five_seconds_from_now();
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
diff --git a/test/core/end2end/tests/disappearing_server.cc b/test/core/end2end/tests/disappearing_server.cc
index 19e4c05605..a0b34dd805 100644
--- a/test/core/end2end/tests/disappearing_server.cc
+++ b/test/core/end2end/tests/disappearing_server.cc
@@ -28,7 +28,7 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static gpr_timespec n_seconds_from_now(int n) {
return grpc_timeout_seconds_to_deadline(n);
@@ -38,26 +38,26 @@ 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_destroy(f->server);
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);
@@ -70,12 +70,12 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void do_request_and_shutdown_server(grpc_end2end_test_config config,
- grpc_end2end_test_fixture *f,
- cq_verifier *cqv) {
- grpc_call *c;
- grpc_call *s;
+ grpc_end2end_test_fixture* f,
+ cq_verifier* cqv) {
+ grpc_call* c;
+ grpc_call* s;
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;
@@ -182,7 +182,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_config config,
static void disappearing_server_test(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = config.create_fixture(NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
gpr_log(GPR_INFO, "Running test: %s/%s", "disappearing_server_test",
config.name);
diff --git a/test/core/end2end/tests/empty_batch.cc b/test/core/end2end/tests/empty_batch.cc
index ee57c16780..59d0025239 100644
--- a/test/core/end2end/tests/empty_batch.cc
+++ b/test/core/end2end/tests/empty_batch.cc
@@ -30,12 +30,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -88,10 +88,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void empty_batch_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_call_error error;
- grpc_op *op = NULL;
+ grpc_op* op = NULL;
gpr_timespec deadline = five_seconds_from_now();
c = grpc_channel_create_call(
diff --git a/test/core/end2end/tests/filter_call_init_fails.cc b/test/core/end2end/tests/filter_call_init_fails.cc
index 09e9dbcd7b..ecf0cc3aca 100644
--- a/test/core/end2end/tests/filter_call_init_fails.cc
+++ b/test/core/end2end/tests/filter_call_init_fails.cc
@@ -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(
diff --git a/test/core/end2end/tests/filter_causes_close.cc b/test/core/end2end/tests/filter_causes_close.cc
index ee7aeb3f33..b6cceabdd5 100644
--- a/test/core/end2end/tests/filter_causes_close.cc
+++ b/test/core/end2end/tests/filter_causes_close.cc
@@ -33,12 +33,12 @@
static bool g_enable_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);
@@ -55,14 +55,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),
@@ -73,13 +73,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);
@@ -91,21 +91,21 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Simple request via a server filter that always closes the stream.*/
static void test_request(grpc_end2end_test_config config) {
- grpc_call *c;
- grpc_call *s;
+ 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_causes_close", 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;
@@ -189,14 +189,18 @@ static void test_request(grpc_end2end_test_config config) {
* Test filter - always closes incoming requests
*/
-typedef struct { grpc_closure *recv_im_ready; } call_data;
+typedef struct {
+ grpc_closure* recv_im_ready;
+} call_data;
-typedef struct { uint8_t unused; } channel_data;
+typedef struct {
+ uint8_t unused;
+} channel_data;
-static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- grpc_call_element *elem = (grpc_call_element *)arg;
- call_data *calld = (call_data *)elem->call_data;
+static void recv_im_ready(grpc_exec_ctx* exec_ctx, void* arg,
+ grpc_error* error) {
+ grpc_call_element* elem = (grpc_call_element*)arg;
+ call_data* calld = (call_data*)elem->call_data;
GRPC_CLOSURE_RUN(
exec_ctx, calld->recv_im_ready,
grpc_error_set_int(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
@@ -206,9 +210,9 @@ static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg,
}
static void start_transport_stream_op_batch(
- grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_transport_stream_op_batch *op) {
- call_data *calld = (call_data *)elem->call_data;
+ grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
+ grpc_transport_stream_op_batch* op) {
+ call_data* calld = (call_data*)elem->call_data;
if (op->recv_initial_metadata) {
calld->recv_im_ready =
op->payload->recv_initial_metadata.recv_initial_metadata_ready;
@@ -218,24 +222,24 @@ static void start_transport_stream_op_batch(
grpc_call_next_op(exec_ctx, elem, op);
}
-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_NONE;
}
-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 = {
start_transport_stream_op_batch,
@@ -254,8 +258,8 @@ static const grpc_channel_filter test_filter = {
* Registration
*/
-static bool maybe_add_filter(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack_builder *builder, void *arg) {
+static bool maybe_add_filter(grpc_exec_ctx* exec_ctx,
+ grpc_channel_stack_builder* builder, void* arg) {
if (g_enable_filter) {
return grpc_channel_stack_builder_prepend_filter(builder, &test_filter,
NULL, NULL);
diff --git a/test/core/end2end/tests/filter_latency.cc b/test/core/end2end/tests/filter_latency.cc
index c24934f05d..e8ec188ec3 100644
--- a/test/core/end2end/tests/filter_latency.cc
+++ b/test/core/end2end/tests/filter_latency.cc
@@ -40,12 +40,12 @@ static gpr_mu g_mu;
static gpr_timespec g_client_latency;
static gpr_timespec g_server_latency;
-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);
@@ -62,14 +62,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),
@@ -80,13 +80,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);
@@ -98,21 +98,21 @@ static void end_test(grpc_end2end_test_fixture *f) {
// Simple request via a server filter that saves the reported latency value.
static void test_request(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_latency", 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;
@@ -247,38 +247,38 @@ static void test_request(grpc_end2end_test_config config) {
* Test latency filter
*/
-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_NONE;
}
-static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- const grpc_call_final_info *final_info,
- grpc_closure *ignored) {
+static void client_destroy_call_elem(grpc_exec_ctx* exec_ctx,
+ grpc_call_element* elem,
+ const grpc_call_final_info* final_info,
+ grpc_closure* ignored) {
gpr_mu_lock(&g_mu);
g_client_latency = final_info->stats.latency;
gpr_mu_unlock(&g_mu);
}
-static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- const grpc_call_final_info *final_info,
- grpc_closure *ignored) {
+static void server_destroy_call_elem(grpc_exec_ctx* exec_ctx,
+ grpc_call_element* elem,
+ const grpc_call_final_info* final_info,
+ grpc_closure* ignored) {
gpr_mu_lock(&g_mu);
g_server_latency = final_info->stats.latency;
gpr_mu_unlock(&g_mu);
}
-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_client_filter = {
grpc_call_next_op,
@@ -310,15 +310,15 @@ static const grpc_channel_filter test_server_filter = {
* Registration
*/
-static bool maybe_add_filter(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack_builder *builder, void *arg) {
- grpc_channel_filter *filter = (grpc_channel_filter *)arg;
+static bool maybe_add_filter(grpc_exec_ctx* exec_ctx,
+ grpc_channel_stack_builder* builder, void* arg) {
+ grpc_channel_filter* filter = (grpc_channel_filter*)arg;
if (g_enable_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 =
@@ -334,13 +334,13 @@ static void init_plugin(void) {
gpr_mu_init(&g_mu);
grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX,
maybe_add_filter,
- (void *)&test_client_filter);
+ (void*)&test_client_filter);
grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX,
maybe_add_filter,
- (void *)&test_client_filter);
+ (void*)&test_client_filter);
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_add_filter,
- (void *)&test_server_filter);
+ (void*)&test_server_filter);
}
static void destroy_plugin(void) { gpr_mu_destroy(&g_mu); }
diff --git a/test/core/end2end/tests/graceful_server_shutdown.cc b/test/core/end2end/tests/graceful_server_shutdown.cc
index 9b3ff98195..22bdac4032 100644
--- a/test/core/end2end/tests/graceful_server_shutdown.cc
+++ b/test/core/end2end/tests/graceful_server_shutdown.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,26 +50,26 @@ 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_destroy(f->server);
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);
@@ -82,13 +82,13 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void test_early_server_shutdown_finishes_inflight_calls(
grpc_end2end_test_config config) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_end2end_test_fixture f = begin_test(
config, "test_early_server_shutdown_finishes_inflight_calls", 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;
diff --git a/test/core/end2end/tests/high_initial_seqno.cc b/test/core/end2end/tests/high_initial_seqno.cc
index 2b72d09e68..72f1d0fd3d 100644
--- a/test/core/end2end/tests/high_initial_seqno.cc
+++ b/test/core/end2end/tests/high_initial_seqno.cc
@@ -32,12 +32,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -54,14 +54,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),
@@ -72,13 +72,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);
@@ -90,11 +90,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -208,10 +208,10 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config,
grpc_end2end_test_fixture f;
grpc_arg client_arg;
grpc_channel_args client_args;
- char *name;
+ char* name;
client_arg.type = GRPC_ARG_INTEGER;
- client_arg.key = const_cast<char *>(GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER);
+ client_arg.key = const_cast<char*>(GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER);
client_arg.value.integer = initial_sequence_number;
client_args.num_args = 1;
diff --git a/test/core/end2end/tests/hpack_size.cc b/test/core/end2end/tests/hpack_size.cc
index e838be9f8b..b2c683ec8e 100644
--- a/test/core/end2end/tests/hpack_size.cc
+++ b/test/core/end2end/tests/hpack_size.cc
@@ -32,9 +32,9 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
-const char *hobbits[][2] = {
+const char* hobbits[][2] = {
{"Adaldrida", "Brandybuck"}, {"Adamanta", "Took"},
{"Adalgrim", "Took"}, {"Adelard", "Took"},
{"Amaranth", "Brandybuck"}, {"Andwise", "Roper"},
@@ -171,13 +171,13 @@ const char *hobbits[][2] = {
{"Wiseman", "Gamwich"}*/
};
-const char *dragons[] = {"Ancalagon", "Glaurung", "Scatha",
+const char* dragons[] = {"Ancalagon", "Glaurung", "Scatha",
"Smaug the Magnificent"};
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);
@@ -194,14 +194,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),
@@ -212,13 +212,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);
@@ -230,11 +230,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f, size_t index) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -357,16 +357,16 @@ static void test_size(grpc_end2end_test_config config, int encode_size,
grpc_channel_args server_args;
grpc_arg client_arg;
grpc_channel_args client_args;
- char *name;
+ char* name;
server_arg.type = GRPC_ARG_INTEGER;
- server_arg.key = const_cast<char *>(GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER);
+ server_arg.key = const_cast<char*>(GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER);
server_arg.value.integer = decode_size;
server_args.num_args = 1;
server_args.args = &server_arg;
client_arg.type = GRPC_ARG_INTEGER;
- client_arg.key = const_cast<char *>(GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER);
+ client_arg.key = const_cast<char*>(GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER);
client_arg.value.integer = encode_size;
client_args.num_args = 1;
client_args.args = &client_arg;
diff --git a/test/core/end2end/tests/idempotent_request.cc b/test/core/end2end/tests/idempotent_request.cc
index 829ece6631..4f61caa6df 100644
--- a/test/core/end2end/tests/idempotent_request.cc
+++ b/test/core/end2end/tests/idempotent_request.cc
@@ -30,12 +30,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -88,11 +88,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -101,7 +101,7 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- char *peer;
+ char* peer;
gpr_timespec deadline = five_seconds_from_now();
c = grpc_channel_create_call(
diff --git a/test/core/end2end/tests/invoke_large_request.cc b/test/core/end2end/tests/invoke_large_request.cc
index c0e63103a8..ade61ac91d 100644
--- a/test/core/end2end/tests/invoke_large_request.cc
+++ b/test/core/end2end/tests/invoke_large_request.cc
@@ -29,12 +29,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -47,14 +47,14 @@ static gpr_timespec n_seconds_from_now(int n) {
return grpc_timeout_seconds_to_deadline(n);
}
-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, n_seconds_from_now(5), 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),
@@ -65,13 +65,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);
@@ -89,17 +89,17 @@ static grpc_slice large_slice(void) {
static void test_invoke_large_request(grpc_end2end_test_config config,
int max_frame_size, int lookahead_bytes) {
- char *name;
+ char* name;
gpr_asprintf(&name,
"test_invoke_large_request:max_frame_size=%d:lookahead_bytes=%d",
max_frame_size, lookahead_bytes);
grpc_arg args[2];
args[0].type = GRPC_ARG_INTEGER;
- args[0].key = const_cast<char *>(GRPC_ARG_HTTP2_MAX_FRAME_SIZE);
+ args[0].key = const_cast<char*>(GRPC_ARG_HTTP2_MAX_FRAME_SIZE);
args[0].value.integer = max_frame_size;
args[1].type = GRPC_ARG_INTEGER;
- args[1].key = const_cast<char *>(GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES);
+ args[1].key = const_cast<char*>(GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES);
args[1].value.integer = lookahead_bytes;
grpc_channel_args channel_args = {GPR_ARRAY_SIZE(args), args};
@@ -109,20 +109,20 @@ static void test_invoke_large_request(grpc_end2end_test_config config,
grpc_slice request_payload_slice = large_slice();
grpc_slice response_payload_slice = large_slice();
- grpc_call *c;
- grpc_call *s;
- grpc_byte_buffer *request_payload =
+ grpc_call* c;
+ grpc_call* s;
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/keepalive_timeout.cc b/test/core/end2end/tests/keepalive_timeout.cc
index 721c1364d0..d071254a98 100644
--- a/test/core/end2end/tests/keepalive_timeout.cc
+++ b/test/core/end2end/tests/keepalive_timeout.cc
@@ -32,12 +32,12 @@
#include "src/core/lib/support/env.h"
#include "test/core/end2end/cq_verifier.h"
-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, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
@@ -54,14 +54,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));
@@ -72,13 +72,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);
@@ -91,36 +91,35 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Client sends a request, server replies with a payload, then waits for the
keepalive watchdog timeouts before returning status. */
static void test_keepalive_timeout(grpc_end2end_test_config config) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_slice response_payload_slice =
grpc_slice_from_copied_string("hello world");
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
grpc_arg keepalive_arg_elems[3];
keepalive_arg_elems[0].type = GRPC_ARG_INTEGER;
- keepalive_arg_elems[0].key = const_cast<char *>(GRPC_ARG_KEEPALIVE_TIME_MS);
+ keepalive_arg_elems[0].key = const_cast<char*>(GRPC_ARG_KEEPALIVE_TIME_MS);
keepalive_arg_elems[0].value.integer = 1500;
keepalive_arg_elems[1].type = GRPC_ARG_INTEGER;
- keepalive_arg_elems[1].key =
- const_cast<char *>(GRPC_ARG_KEEPALIVE_TIMEOUT_MS);
+ keepalive_arg_elems[1].key = const_cast<char*>(GRPC_ARG_KEEPALIVE_TIMEOUT_MS);
keepalive_arg_elems[1].value.integer = 0;
keepalive_arg_elems[2].type = GRPC_ARG_INTEGER;
- keepalive_arg_elems[2].key = const_cast<char *>(GRPC_ARG_HTTP2_BDP_PROBE);
+ keepalive_arg_elems[2].key = const_cast<char*>(GRPC_ARG_HTTP2_BDP_PROBE);
keepalive_arg_elems[2].value.integer = 0;
grpc_channel_args keepalive_args = {GPR_ARRAY_SIZE(keepalive_arg_elems),
keepalive_arg_elems};
grpc_end2end_test_fixture f =
begin_test(config, "keepalive_timeout", &keepalive_args, 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
@@ -192,8 +191,8 @@ static void test_keepalive_timeout(grpc_end2end_test_config config) {
CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
cq_verify(cqv);
- char *details_str = grpc_slice_to_c_string(details);
- char *method_str = grpc_slice_to_c_string(call_details.method);
+ char* details_str = grpc_slice_to_c_string(details);
+ char* method_str = grpc_slice_to_c_string(call_details.method);
GPR_ASSERT(status == GRPC_STATUS_INTERNAL);
GPR_ASSERT(0 == grpc_slice_str_cmp(details, "keepalive watchdog timeout"));
GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo"));
diff --git a/test/core/end2end/tests/large_metadata.cc b/test/core/end2end/tests/large_metadata.cc
index c2aa4d187b..4afd9f31ba 100644
--- a/test/core/end2end/tests/large_metadata.cc
+++ b/test/core/end2end/tests/large_metadata.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -86,28 +86,28 @@ 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) {
- 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_metadata meta;
const size_t large_size = 64 * 1024;
grpc_arg arg;
arg.type = GRPC_ARG_INTEGER;
- arg.key = const_cast<char *>(GRPC_ARG_MAX_METADATA_SIZE);
+ arg.key = const_cast<char*>(GRPC_ARG_MAX_METADATA_SIZE);
arg.value.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);
+ 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;
diff --git a/test/core/end2end/tests/load_reporting_hook.cc b/test/core/end2end/tests/load_reporting_hook.cc
index 7b503790db..5c2c3b497c 100644
--- a/test/core/end2end/tests/load_reporting_hook.cc
+++ b/test/core/end2end/tests/load_reporting_hook.cc
@@ -36,16 +36,16 @@
enum { TIMEOUT = 200000 };
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
typedef struct {
gpr_mu mu;
intptr_t channel_id;
intptr_t call_id;
- char *initial_md_str;
- char *trailing_md_str;
- char *method_name;
+ char* initial_md_str;
+ char* trailing_md_str;
+ char* method_name;
uint64_t incoming_bytes;
uint64_t outgoing_bytes;
@@ -56,9 +56,9 @@ typedef struct {
} load_reporting_data;
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);
@@ -77,14 +77,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),
@@ -95,13 +95,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);
@@ -113,25 +113,25 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void request_response_with_payload(
grpc_end2end_test_config config, grpc_end2end_test_fixture f,
- const char *method_name, const char *request_msg, const char *response_msg,
- grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata) {
+ const char* method_name, const char* request_msg, const char* response_msg,
+ grpc_metadata* initial_lr_metadata, grpc_metadata* trailing_lr_metadata) {
grpc_slice request_payload_slice = grpc_slice_from_static_string(request_msg);
grpc_slice response_payload_slice =
grpc_slice_from_static_string(response_msg);
- grpc_call *c;
- grpc_call *s;
- grpc_byte_buffer *request_payload =
+ grpc_call* c;
+ grpc_call* s;
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
@@ -264,7 +264,7 @@ static void request_response_with_payload(
/* override the default for testing purposes */
extern void (*g_load_reporting_fn)(
- const grpc_load_reporting_call_data *call_data);
+ const grpc_load_reporting_call_data* call_data);
static void test_load_reporting_hook(grpc_end2end_test_config config) {
/* TODO(dgq): this test is currently a noop until LR is fully defined.
@@ -272,15 +272,15 @@ static void test_load_reporting_hook(grpc_end2end_test_config config) {
/* Introduce load reporting for the server through its arguments */
grpc_arg arg = grpc_load_reporting_enable_arg();
- grpc_channel_args *lr_server_args =
+ grpc_channel_args* lr_server_args =
grpc_channel_args_copy_and_add(NULL, &arg, 1);
grpc_end2end_test_fixture f =
begin_test(config, "test_load_reporting_hook", NULL, lr_server_args);
- const char *method_name = "/gRPCFTW";
- const char *request_msg = "the msg from the client";
- const char *response_msg = "... and the response from the server";
+ const char* method_name = "/gRPCFTW";
+ const char* request_msg = "the msg from the client";
+ const char* response_msg = "... and the response from the server";
grpc_metadata initial_lr_metadata;
grpc_metadata trailing_lr_metadata;
diff --git a/test/core/end2end/tests/max_concurrent_streams.cc b/test/core/end2end/tests/max_concurrent_streams.cc
index deb44bbc3e..b8b49d65fb 100644
--- a/test/core/end2end/tests/max_concurrent_streams.cc
+++ b/test/core/end2end/tests/max_concurrent_streams.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -86,11 +86,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -196,13 +196,13 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f;
grpc_arg server_arg;
grpc_channel_args server_args;
- grpc_call *c1;
- grpc_call *c2;
- grpc_call *s1;
- grpc_call *s2;
+ grpc_call* c1;
+ grpc_call* c2;
+ grpc_call* s1;
+ grpc_call* s2;
int live_call;
gpr_timespec deadline;
- cq_verifier *cqv;
+ cq_verifier* cqv;
grpc_event ev;
grpc_call_details call_details;
grpc_metadata_array request_metadata_recv;
@@ -216,12 +216,12 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
grpc_status_code status2;
grpc_slice details2;
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
int was_cancelled;
int got_client_start;
int got_server_start;
- server_arg.key = const_cast<char *>(GRPC_ARG_MAX_CONCURRENT_STREAMS);
+ server_arg.key = const_cast<char*>(GRPC_ARG_MAX_CONCURRENT_STREAMS);
server_arg.type = GRPC_ARG_INTEGER;
server_arg.value.integer = 1;
@@ -441,11 +441,11 @@ static void test_max_concurrent_streams_with_timeout_on_first(
grpc_end2end_test_fixture f;
grpc_arg server_arg;
grpc_channel_args server_args;
- grpc_call *c1;
- grpc_call *c2;
- grpc_call *s1;
- grpc_call *s2;
- cq_verifier *cqv;
+ grpc_call* c1;
+ grpc_call* c2;
+ grpc_call* s1;
+ grpc_call* s2;
+ cq_verifier* cqv;
grpc_call_details call_details;
grpc_metadata_array request_metadata_recv;
grpc_metadata_array initial_metadata_recv1;
@@ -458,10 +458,10 @@ static void test_max_concurrent_streams_with_timeout_on_first(
grpc_status_code status2;
grpc_slice details2 = grpc_empty_slice();
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
int was_cancelled;
- server_arg.key = const_cast<char *>(GRPC_ARG_MAX_CONCURRENT_STREAMS);
+ server_arg.key = const_cast<char*>(GRPC_ARG_MAX_CONCURRENT_STREAMS);
server_arg.type = GRPC_ARG_INTEGER;
server_arg.value.integer = 1;
@@ -636,10 +636,10 @@ static void test_max_concurrent_streams_with_timeout_on_second(
grpc_end2end_test_fixture f;
grpc_arg server_arg;
grpc_channel_args server_args;
- grpc_call *c1;
- grpc_call *c2;
- grpc_call *s1;
- cq_verifier *cqv;
+ grpc_call* c1;
+ grpc_call* c2;
+ grpc_call* s1;
+ cq_verifier* cqv;
grpc_call_details call_details;
grpc_metadata_array request_metadata_recv;
grpc_metadata_array initial_metadata_recv1;
@@ -652,10 +652,10 @@ static void test_max_concurrent_streams_with_timeout_on_second(
grpc_status_code status2;
grpc_slice details2 = grpc_empty_slice();
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
int was_cancelled;
- server_arg.key = const_cast<char *>(GRPC_ARG_MAX_CONCURRENT_STREAMS);
+ server_arg.key = const_cast<char*>(GRPC_ARG_MAX_CONCURRENT_STREAMS);
server_arg.type = GRPC_ARG_INTEGER;
server_arg.value.integer = 1;
diff --git a/test/core/end2end/tests/max_connection_age.cc b/test/core/end2end/tests/max_connection_age.cc
index 01cae9e3e0..b5d4dcf963 100644
--- a/test/core/end2end/tests/max_connection_age.cc
+++ b/test/core/end2end/tests/max_connection_age.cc
@@ -45,9 +45,9 @@
/* The grace period for the test to observe the channel shutdown process */
#define IMMEDIATE_SHUTDOWN_GRACE_TIME_MS 3000
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
-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, grpc_timeout_seconds_to_deadline(5),
@@ -55,19 +55,19 @@ static void drain_cq(grpc_completion_queue *cq) {
} 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_destroy(f->server);
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);
@@ -79,27 +79,27 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void test_max_age_forcibly_close(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = config.create_fixture(NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_arg server_a[3];
server_a[0].type = GRPC_ARG_INTEGER;
- server_a[0].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_AGE_MS);
+ server_a[0].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_AGE_MS);
server_a[0].value.integer = MAX_CONNECTION_AGE_MS;
server_a[1].type = GRPC_ARG_INTEGER;
- server_a[1].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS);
+ server_a[1].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS);
server_a[1].value.integer = MAX_CONNECTION_AGE_GRACE_MS;
server_a[2].type = GRPC_ARG_INTEGER;
- server_a[2].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_IDLE_MS);
+ server_a[2].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_IDLE_MS);
server_a[2].value.integer = MAX_CONNECTION_IDLE_MS;
grpc_channel_args server_args = {GPR_ARRAY_SIZE(server_a), server_a};
config.init_client(&f, NULL);
config.init_server(&f, &server_args);
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(CALL_DEADLINE_S);
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;
@@ -222,27 +222,27 @@ static void test_max_age_forcibly_close(grpc_end2end_test_config config) {
static void test_max_age_gracefully_close(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = config.create_fixture(NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_arg server_a[3];
server_a[0].type = GRPC_ARG_INTEGER;
- server_a[0].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_AGE_MS);
+ server_a[0].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_AGE_MS);
server_a[0].value.integer = MAX_CONNECTION_AGE_MS;
server_a[1].type = GRPC_ARG_INTEGER;
- server_a[1].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS);
+ server_a[1].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS);
server_a[1].value.integer = INT_MAX;
server_a[2].type = GRPC_ARG_INTEGER;
- server_a[2].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_IDLE_MS);
+ server_a[2].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_IDLE_MS);
server_a[2].value.integer = MAX_CONNECTION_IDLE_MS;
grpc_channel_args server_args = {GPR_ARRAY_SIZE(server_a), server_a};
config.init_client(&f, NULL);
config.init_server(&f, &server_args);
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(CALL_DEADLINE_S);
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;
diff --git a/test/core/end2end/tests/max_connection_idle.cc b/test/core/end2end/tests/max_connection_idle.cc
index a44d15452c..d850e4267b 100644
--- a/test/core/end2end/tests/max_connection_idle.cc
+++ b/test/core/end2end/tests/max_connection_idle.cc
@@ -32,9 +32,9 @@
#define MAX_CONNECTION_IDLE_MS 500
#define MAX_CONNECTION_AGE_MS 9999
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
-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, grpc_timeout_seconds_to_deadline(5),
@@ -43,12 +43,12 @@ static void drain_cq(grpc_completion_queue *cq) {
}
static void simple_request_body(grpc_end2end_test_config config,
- grpc_end2end_test_fixture *f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f->cq);
+ grpc_end2end_test_fixture* f) {
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -57,7 +57,7 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- char *peer;
+ char* peer;
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5);
c = grpc_channel_create_call(
@@ -169,19 +169,19 @@ static void simple_request_body(grpc_end2end_test_config config,
static void test_max_connection_idle(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = config.create_fixture(NULL, NULL);
grpc_connectivity_state state = GRPC_CHANNEL_IDLE;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_arg client_a[1];
client_a[0].type = GRPC_ARG_INTEGER;
client_a[0].key =
- const_cast<char *>("grpc.testing.fixed_reconnect_backoff_ms");
+ const_cast<char*>("grpc.testing.fixed_reconnect_backoff_ms");
client_a[0].value.integer = 1000;
grpc_arg server_a[2];
server_a[0].type = GRPC_ARG_INTEGER;
- server_a[0].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_IDLE_MS);
+ server_a[0].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_IDLE_MS);
server_a[0].value.integer = MAX_CONNECTION_IDLE_MS;
server_a[1].type = GRPC_ARG_INTEGER;
- server_a[1].key = const_cast<char *>(GRPC_ARG_MAX_CONNECTION_AGE_MS);
+ server_a[1].key = const_cast<char*>(GRPC_ARG_MAX_CONNECTION_AGE_MS);
server_a[1].value.integer = MAX_CONNECTION_AGE_MS;
grpc_channel_args client_args = {GPR_ARRAY_SIZE(client_a), client_a};
grpc_channel_args server_args = {GPR_ARRAY_SIZE(server_a), server_a};
diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc
index 2ee7b0be42..3d677f1d8f 100644
--- a/test/core/end2end/tests/max_message_length.cc
+++ b/test/core/end2end/tests/max_message_length.cc
@@ -34,12 +34,12 @@
#include "test/core/end2end/cq_verifier.h"
-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);
// We intentionally do not pass the client and server args to
@@ -59,14 +59,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->cq, tag(1000));
grpc_event ev = grpc_completion_queue_next(
@@ -77,13 +77,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);
@@ -106,16 +106,16 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
send_limit, use_service_config, use_string_json_value);
grpc_end2end_test_fixture f;
- grpc_call *c = NULL;
- grpc_call *s = NULL;
- cq_verifier *cqv;
+ grpc_call* c = NULL;
+ grpc_call* s = NULL;
+ cq_verifier* cqv;
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
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_byte_buffer *recv_payload = NULL;
+ grpc_byte_buffer* recv_payload = NULL;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -125,17 +125,17 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
grpc_slice details;
int was_cancelled = 2;
- grpc_channel_args *client_args = NULL;
- grpc_channel_args *server_args = NULL;
+ grpc_channel_args* client_args = NULL;
+ grpc_channel_args* server_args = NULL;
if (use_service_config) {
// We don't currently support service configs on the server side.
GPR_ASSERT(send_limit);
grpc_arg arg;
arg.type = GRPC_ARG_STRING;
- arg.key = const_cast<char *>(GRPC_ARG_SERVICE_CONFIG);
+ arg.key = const_cast<char*>(GRPC_ARG_SERVICE_CONFIG);
arg.value.string =
use_string_json_value
- ? const_cast<char *>(
+ ? const_cast<char*>(
"{\n"
" \"methodConfig\": [ {\n"
" \"name\": [\n"
@@ -144,7 +144,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
" \"maxRequestMessageBytes\": \"5\"\n"
" } ]\n"
"}")
- : const_cast<char *>(
+ : const_cast<char*>(
"{\n"
" \"methodConfig\": [ {\n"
" \"name\": [\n"
@@ -158,11 +158,11 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
// Set limit via channel args.
grpc_arg arg;
arg.key = send_limit
- ? const_cast<char *>(GRPC_ARG_MAX_SEND_MESSAGE_LENGTH)
- : const_cast<char *>(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH);
+ ? const_cast<char*>(GRPC_ARG_MAX_SEND_MESSAGE_LENGTH)
+ : const_cast<char*>(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH);
arg.type = GRPC_ARG_INTEGER;
arg.value.integer = 5;
- grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
+ grpc_channel_args* args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
if (send_limit) {
client_args = args;
} else {
@@ -299,16 +299,16 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
send_limit, use_service_config, use_string_json_value);
grpc_end2end_test_fixture f;
- grpc_call *c = NULL;
- grpc_call *s = NULL;
- cq_verifier *cqv;
+ grpc_call* c = NULL;
+ grpc_call* s = NULL;
+ cq_verifier* cqv;
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
grpc_slice response_payload_slice =
grpc_slice_from_copied_string("hello world");
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- grpc_byte_buffer *recv_payload = NULL;
+ grpc_byte_buffer* recv_payload = NULL;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
@@ -318,15 +318,15 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
grpc_slice details;
int was_cancelled = 2;
- grpc_channel_args *client_args = NULL;
- grpc_channel_args *server_args = NULL;
+ grpc_channel_args* client_args = NULL;
+ grpc_channel_args* server_args = NULL;
if (use_service_config) {
// We don't currently support service configs on the server side.
GPR_ASSERT(!send_limit);
grpc_arg arg;
arg.type = GRPC_ARG_STRING;
- arg.key = const_cast<char *>(GRPC_ARG_SERVICE_CONFIG);
- arg.value.string = const_cast<char *>(
+ arg.key = const_cast<char*>(GRPC_ARG_SERVICE_CONFIG);
+ arg.value.string = const_cast<char*>(
use_string_json_value
? "{\n"
" \"methodConfig\": [ {\n"
@@ -349,11 +349,11 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
// Set limit via channel args.
grpc_arg arg;
arg.key = send_limit
- ? const_cast<char *>(GRPC_ARG_MAX_SEND_MESSAGE_LENGTH)
- : const_cast<char *>(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH);
+ ? const_cast<char*>(GRPC_ARG_MAX_SEND_MESSAGE_LENGTH)
+ : const_cast<char*>(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH);
arg.type = GRPC_ARG_INTEGER;
arg.value.integer = 5;
- grpc_channel_args *args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
+ grpc_channel_args* args = grpc_channel_args_copy_and_add(NULL, &arg, 1);
if (send_limit) {
server_args = args;
} else {
diff --git a/test/core/end2end/tests/negative_deadline.cc b/test/core/end2end/tests/negative_deadline.cc
index c8667f4f4d..0d56038684 100644
--- a/test/core/end2end/tests/negative_deadline.cc
+++ b/test/core/end2end/tests/negative_deadline.cc
@@ -30,12 +30,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -88,10 +88,10 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f, size_t num_ops) {
- grpc_call *c;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ 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_status_code status;
diff --git a/test/core/end2end/tests/network_status_change.cc b/test/core/end2end/tests/network_status_change.cc
index 4d77174e22..088563cb2c 100644
--- a/test/core/end2end/tests/network_status_change.cc
+++ b/test/core/end2end/tests/network_status_change.cc
@@ -31,12 +31,12 @@
/* this is a private API but exposed here for testing*/
extern void grpc_network_status_shutdown_all_endpoints();
-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);
@@ -53,14 +53,14 @@ static gpr_timespec five_seconds_from_now(void) {
return n_seconds_from_now(500);
}
-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),
@@ -71,13 +71,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);
@@ -89,21 +89,21 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Client sends a request with payload, server reads then returns status. */
static void test_invoke_network_status_change(grpc_end2end_test_config config) {
- grpc_call *c;
- grpc_call *s;
+ 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, "test_invoke_request_with_payload", 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;
diff --git a/test/core/end2end/tests/no_logging.cc b/test/core/end2end/tests/no_logging.cc
index d898ef0581..1a7b57cd84 100644
--- a/test/core/end2end/tests/no_logging.cc
+++ b/test/core/end2end/tests/no_logging.cc
@@ -34,12 +34,12 @@
enum { TIMEOUT = 200000 };
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
-extern "C" void gpr_default_log(gpr_log_func_args *args);
+extern "C" void gpr_default_log(gpr_log_func_args* args);
-static void test_no_log(gpr_log_func_args *args) {
- char *message = NULL;
+static void test_no_log(gpr_log_func_args* args) {
+ char* message = NULL;
gpr_asprintf(&message, "Unwanted log: %s", args->message);
args->message = message;
gpr_default_log(args);
@@ -47,7 +47,7 @@ static void test_no_log(gpr_log_func_args *args) {
abort();
}
-static void test_no_error_log(gpr_log_func_args *args) {
+static void test_no_error_log(gpr_log_func_args* args) {
if (args->severity == GPR_LOG_SEVERITY_ERROR) {
test_no_log(args);
}
@@ -55,15 +55,15 @@ static void test_no_error_log(gpr_log_func_args *args) {
static gpr_atm g_log_func = (gpr_atm)gpr_default_log;
-static void log_dispatcher_func(gpr_log_func_args *args) {
+static void log_dispatcher_func(gpr_log_func_args* args) {
gpr_log_func log_func = (gpr_log_func)gpr_atm_no_barrier_load(&g_log_func);
log_func(args);
}
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);
@@ -80,14 +80,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),
@@ -98,13 +98,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);
@@ -116,11 +116,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -129,7 +129,7 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- char *peer;
+ char* peer;
gpr_timespec deadline = five_seconds_from_now();
c = grpc_channel_create_call(
diff --git a/test/core/end2end/tests/no_op.cc b/test/core/end2end/tests/no_op.cc
index 8400c27486..98cf5eb9dc 100644
--- a/test/core/end2end/tests/no_op.cc
+++ b/test/core/end2end/tests/no_op.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
diff --git a/test/core/end2end/tests/payload.cc b/test/core/end2end/tests/payload.cc
index d98eed68e0..0ff9461a47 100644
--- a/test/core/end2end/tests/payload.cc
+++ b/test/core/end2end/tests/payload.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -89,9 +89,9 @@ static void end_test(grpc_end2end_test_fixture *f) {
static grpc_slice generate_random_slice() {
size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
- char *output;
+ char* output;
const size_t output_size = 1024 * 1024;
- output = (char *)gpr_malloc(output_size);
+ output = (char*)gpr_malloc(output_size);
for (i = 0; i < output_size - 1; ++i) {
output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
}
@@ -109,20 +109,20 @@ static void request_response_with_payload(grpc_end2end_test_config config,
grpc_slice request_payload_slice = generate_random_slice();
grpc_slice response_payload_slice = generate_random_slice();
- grpc_call *c;
- grpc_call *s;
- grpc_byte_buffer *request_payload =
+ grpc_call* c;
+ grpc_call* s;
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/ping.cc b/test/core/end2end/tests/ping.cc
index e6b0e55b01..88f62c0a2b 100644
--- a/test/core/end2end/tests/ping.cc
+++ b/test/core/end2end/tests/ping.cc
@@ -28,33 +28,33 @@
#define PING_NUM 5
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static void test_ping(grpc_end2end_test_config config,
int min_time_between_pings_ms) {
grpc_end2end_test_fixture f = config.create_fixture(NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_connectivity_state state = GRPC_CHANNEL_IDLE;
int i;
grpc_arg client_a[3];
client_a[0].type = GRPC_ARG_INTEGER;
client_a[0].key =
- const_cast<char *>(GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS);
+ const_cast<char*>(GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS);
client_a[0].value.integer = 10;
client_a[1].type = GRPC_ARG_INTEGER;
- client_a[1].key = const_cast<char *>(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA);
+ client_a[1].key = const_cast<char*>(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA);
client_a[1].value.integer = 0;
client_a[2].type = GRPC_ARG_INTEGER;
- client_a[2].key = const_cast<char *>(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS);
+ client_a[2].key = const_cast<char*>(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS);
client_a[2].value.integer = 1;
grpc_arg server_a[2];
server_a[0].type = GRPC_ARG_INTEGER;
server_a[0].key =
- const_cast<char *>(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS);
+ const_cast<char*>(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS);
server_a[0].value.integer = 0;
server_a[1].type = GRPC_ARG_INTEGER;
- server_a[1].key = const_cast<char *>(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS);
+ server_a[1].key = const_cast<char*>(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS);
server_a[1].value.integer = 1;
grpc_channel_args client_args = {GPR_ARRAY_SIZE(client_a), client_a};
grpc_channel_args server_args = {GPR_ARRAY_SIZE(server_a), server_a};
diff --git a/test/core/end2end/tests/ping_pong_streaming.cc b/test/core/end2end/tests/ping_pong_streaming.cc
index 1c44262c3d..3c2e76b9f9 100644
--- a/test/core/end2end/tests/ping_pong_streaming.cc
+++ b/test/core/end2end/tests/ping_pong_streaming.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -89,11 +89,11 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
int messages) {
grpc_end2end_test_fixture f =
begin_test(config, "test_pingpong_streaming", NULL, NULL);
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -102,10 +102,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- grpc_byte_buffer *request_payload;
- grpc_byte_buffer *request_payload_recv;
- grpc_byte_buffer *response_payload;
- grpc_byte_buffer *response_payload_recv;
+ grpc_byte_buffer* request_payload;
+ grpc_byte_buffer* request_payload_recv;
+ grpc_byte_buffer* response_payload;
+ grpc_byte_buffer* response_payload_recv;
int i;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
diff --git a/test/core/end2end/tests/proxy_auth.cc b/test/core/end2end/tests/proxy_auth.cc
index fe87399f03..d5dce7c6de 100644
--- a/test/core/end2end/tests/proxy_auth.cc
+++ b/test/core/end2end/tests/proxy_auth.cc
@@ -35,12 +35,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -57,14 +57,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),
@@ -75,13 +75,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);
@@ -93,11 +93,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -106,7 +106,7 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- char *peer;
+ char* peer;
gpr_timespec deadline = five_seconds_from_now();
c = grpc_channel_create_call(
@@ -219,8 +219,8 @@ static void test_invoke_proxy_auth(grpc_end2end_test_config config) {
/* Indicate that the proxy requires user auth */
grpc_arg client_arg;
client_arg.type = GRPC_ARG_STRING;
- client_arg.key = const_cast<char *>(GRPC_ARG_HTTP_PROXY_AUTH_CREDS);
- client_arg.value.string = const_cast<char *>(GRPC_TEST_HTTP_PROXY_AUTH_CREDS);
+ client_arg.key = const_cast<char*>(GRPC_ARG_HTTP_PROXY_AUTH_CREDS);
+ client_arg.value.string = const_cast<char*>(GRPC_TEST_HTTP_PROXY_AUTH_CREDS);
grpc_channel_args client_args = {1, &client_arg};
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_proxy_auth", &client_args, NULL);
diff --git a/test/core/end2end/tests/registered_call.cc b/test/core/end2end/tests/registered_call.cc
index 4598029818..b43ca04766 100644
--- a/test/core/end2end/tests/registered_call.cc
+++ b/test/core/end2end/tests/registered_call.cc
@@ -30,12 +30,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -87,12 +87,12 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void simple_request_body(grpc_end2end_test_config config,
- grpc_end2end_test_fixture f, void *rc) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_end2end_test_fixture f, void* rc) {
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -194,7 +194,7 @@ static void simple_request_body(grpc_end2end_test_config config,
static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_simple_request", NULL, NULL);
- void *rc = grpc_channel_register_call(
+ void* rc = grpc_channel_register_call(
f.client, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), NULL);
@@ -207,7 +207,7 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
int i;
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
- void *rc = grpc_channel_register_call(
+ void* rc = grpc_channel_register_call(
f.client, "/foo",
get_host_override_string("foo.test.google.fr:1234", config), NULL);
diff --git a/test/core/end2end/tests/request_with_flags.cc b/test/core/end2end/tests/request_with_flags.cc
index dfb7d58743..77c931844c 100644
--- a/test/core/end2end/tests/request_with_flags.cc
+++ b/test/core/end2end/tests/request_with_flags.cc
@@ -29,12 +29,12 @@
#include "src/core/lib/transport/byte_stream.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -51,14 +51,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),
@@ -69,13 +69,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);
@@ -86,22 +86,22 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void test_invoke_request_with_flags(
- grpc_end2end_test_config config, uint32_t *flags_for_op,
+ grpc_end2end_test_config config, uint32_t* flags_for_op,
grpc_call_error call_start_batch_expected_result) {
- 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);
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_request_with_flags", 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;
diff --git a/test/core/end2end/tests/request_with_payload.cc b/test/core/end2end/tests/request_with_payload.cc
index 575e54c7d9..946144239c 100644
--- a/test/core/end2end/tests/request_with_payload.cc
+++ b/test/core/end2end/tests/request_with_payload.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -86,21 +86,21 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Client sends a request with payload, server reads then returns status. */
static void test_invoke_request_with_payload(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, "test_invoke_request_with_payload", 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;
diff --git a/test/core/end2end/tests/resource_quota_server.cc b/test/core/end2end/tests/resource_quota_server.cc
index e710e39e1d..dd00c9843f 100644
--- a/test/core/end2end/tests/resource_quota_server.cc
+++ b/test/core/end2end/tests/resource_quota_server.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -89,9 +89,9 @@ static void end_test(grpc_end2end_test_fixture *f) {
static grpc_slice generate_random_slice() {
size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
- char *output;
+ char* output;
const size_t output_size = 1024 * 1024;
- output = (char *)gpr_malloc(output_size);
+ output = (char*)gpr_malloc(output_size);
for (i = 0; i < output_size - 1; ++i) {
output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
}
@@ -106,7 +106,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
FEATURE_MASK_DOES_NOT_SUPPORT_RESOURCE_QUOTA_SERVER) {
return;
}
- grpc_resource_quota *resource_quota =
+ grpc_resource_quota* resource_quota =
grpc_resource_quota_create("test_server");
grpc_resource_quota_resize(resource_quota, 5 * 1024 * 1024);
@@ -117,7 +117,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
#define SERVER_END_BASE_TAG 0x4000
grpc_arg arg;
- arg.key = const_cast<char *>(GRPC_ARG_RESOURCE_QUOTA);
+ arg.key = const_cast<char*>(GRPC_ARG_RESOURCE_QUOTA);
arg.type = GRPC_ARG_POINTER;
arg.value.pointer.p = resource_quota;
arg.value.pointer.vtable = grpc_resource_quota_arg_vtable();
@@ -131,26 +131,26 @@ void resource_quota_server(grpc_end2end_test_config config) {
* will be verified on completion. */
grpc_slice request_payload_slice = generate_random_slice();
- grpc_call **client_calls =
- (grpc_call **)malloc(sizeof(grpc_call *) * NUM_CALLS);
- grpc_call **server_calls =
- (grpc_call **)malloc(sizeof(grpc_call *) * NUM_CALLS);
- grpc_metadata_array *initial_metadata_recv =
- (grpc_metadata_array *)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
- grpc_metadata_array *trailing_metadata_recv =
- (grpc_metadata_array *)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
- grpc_metadata_array *request_metadata_recv =
- (grpc_metadata_array *)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
- grpc_call_details *call_details =
- (grpc_call_details *)malloc(sizeof(grpc_call_details) * NUM_CALLS);
- grpc_status_code *status =
- (grpc_status_code *)malloc(sizeof(grpc_status_code) * NUM_CALLS);
- grpc_slice *details = (grpc_slice *)malloc(sizeof(grpc_slice) * NUM_CALLS);
- grpc_byte_buffer **request_payload =
- (grpc_byte_buffer **)malloc(sizeof(grpc_byte_buffer *) * NUM_CALLS);
- grpc_byte_buffer **request_payload_recv =
- (grpc_byte_buffer **)malloc(sizeof(grpc_byte_buffer *) * NUM_CALLS);
- int *was_cancelled = (int *)malloc(sizeof(int) * NUM_CALLS);
+ grpc_call** client_calls =
+ (grpc_call**)malloc(sizeof(grpc_call*) * NUM_CALLS);
+ grpc_call** server_calls =
+ (grpc_call**)malloc(sizeof(grpc_call*) * NUM_CALLS);
+ grpc_metadata_array* initial_metadata_recv =
+ (grpc_metadata_array*)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
+ grpc_metadata_array* trailing_metadata_recv =
+ (grpc_metadata_array*)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
+ grpc_metadata_array* request_metadata_recv =
+ (grpc_metadata_array*)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
+ grpc_call_details* call_details =
+ (grpc_call_details*)malloc(sizeof(grpc_call_details) * NUM_CALLS);
+ grpc_status_code* status =
+ (grpc_status_code*)malloc(sizeof(grpc_status_code) * NUM_CALLS);
+ grpc_slice* details = (grpc_slice*)malloc(sizeof(grpc_slice) * NUM_CALLS);
+ grpc_byte_buffer** request_payload =
+ (grpc_byte_buffer**)malloc(sizeof(grpc_byte_buffer*) * NUM_CALLS);
+ grpc_byte_buffer** request_payload_recv =
+ (grpc_byte_buffer**)malloc(sizeof(grpc_byte_buffer*) * NUM_CALLS);
+ int* was_cancelled = (int*)malloc(sizeof(int) * NUM_CALLS);
grpc_call_error error;
int pending_client_calls = 0;
int pending_server_start_calls = 0;
@@ -162,7 +162,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
int unavailable = 0;
grpc_op ops[6];
- grpc_op *op;
+ grpc_op* op;
for (int i = 0; i < NUM_CALLS; i++) {
grpc_metadata_array_init(&initial_metadata_recv[i]);
diff --git a/test/core/end2end/tests/server_finishes_request.cc b/test/core/end2end/tests/server_finishes_request.cc
index 49b9f27396..50544a6759 100644
--- a/test/core/end2end/tests/server_finishes_request.cc
+++ b/test/core/end2end/tests/server_finishes_request.cc
@@ -30,12 +30,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -88,11 +88,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
diff --git a/test/core/end2end/tests/shutdown_finishes_calls.cc b/test/core/end2end/tests/shutdown_finishes_calls.cc
index f90359f09a..26a53e5161 100644
--- a/test/core/end2end/tests/shutdown_finishes_calls.cc
+++ b/test/core/end2end/tests/shutdown_finishes_calls.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,20 +50,20 @@ 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_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_client(f);
grpc_completion_queue_shutdown(f->cq);
@@ -75,13 +75,13 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void test_early_server_shutdown_finishes_inflight_calls(
grpc_end2end_test_config config) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_end2end_test_fixture f = begin_test(
config, "test_early_server_shutdown_finishes_inflight_calls", 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;
diff --git a/test/core/end2end/tests/shutdown_finishes_tags.cc b/test/core/end2end/tests/shutdown_finishes_tags.cc
index 7914cc95ba..0275a1e4ef 100644
--- a/test/core/end2end/tests/shutdown_finishes_tags.cc
+++ b/test/core/end2end/tests/shutdown_finishes_tags.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,20 +50,20 @@ 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_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_client(f);
grpc_completion_queue_shutdown(f->cq);
@@ -77,8 +77,8 @@ static void test_early_server_shutdown_finishes_tags(
grpc_end2end_test_config config) {
grpc_end2end_test_fixture f = begin_test(
config, "test_early_server_shutdown_finishes_tags", NULL, NULL);
- cq_verifier *cqv = cq_verifier_create(f.cq);
- grpc_call *s = (grpc_call *)(uintptr_t)1;
+ cq_verifier* cqv = cq_verifier_create(f.cq);
+ grpc_call* s = (grpc_call*)(uintptr_t)1;
grpc_call_details call_details;
grpc_metadata_array request_metadata_recv;
diff --git a/test/core/end2end/tests/simple_cacheable_request.cc b/test/core/end2end/tests/simple_cacheable_request.cc
index faa5c193dc..e2ee7bf35a 100644
--- a/test/core/end2end/tests/simple_cacheable_request.cc
+++ b/test/core/end2end/tests/simple_cacheable_request.cc
@@ -30,12 +30,12 @@
enum { TIMEOUT = 200000 };
-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);
@@ -52,14 +52,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),
@@ -70,13 +70,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);
@@ -89,15 +89,15 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Request/response with metadata and payload.*/
static void test_cacheable_request_response_with_metadata_and_payload(
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_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"),
grpc_slice_from_static_string("val1"),
@@ -118,14 +118,14 @@ static void test_cacheable_request_response_with_metadata_and_payload(
grpc_end2end_test_fixture f = begin_test(
config, "test_cacheable_request_response_with_metadata_and_payload", 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/simple_delayed_request.cc b/test/core/end2end/tests/simple_delayed_request.cc
index a4cbcbfedf..eef36c9710 100644
--- a/test/core/end2end/tests/simple_delayed_request.cc
+++ b/test/core/end2end/tests/simple_delayed_request.cc
@@ -28,7 +28,7 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-static void *tag(intptr_t t) { return (void *)t; }
+static void* tag(intptr_t t) { return (void*)t; }
static gpr_timespec n_seconds_from_now(int n) {
return grpc_timeout_seconds_to_deadline(n);
@@ -38,14 +38,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),
@@ -56,13 +56,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);
@@ -73,15 +73,15 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void simple_delayed_request_body(grpc_end2end_test_config config,
- grpc_end2end_test_fixture *f,
- grpc_channel_args *client_args,
- grpc_channel_args *server_args,
+ grpc_end2end_test_fixture* f,
+ grpc_channel_args* client_args,
+ grpc_channel_args* server_args,
long delay_us) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f->cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -192,7 +192,7 @@ static void test_simple_delayed_request_short(grpc_end2end_test_config config) {
grpc_arg arg_array[1];
arg_array[0].type = GRPC_ARG_INTEGER;
arg_array[0].key =
- const_cast<char *>("grpc.testing.fixed_reconnect_backoff_ms");
+ const_cast<char*>("grpc.testing.fixed_reconnect_backoff_ms");
arg_array[0].value.integer = 1000;
client_args.args = arg_array;
client_args.num_args = 1;
@@ -212,7 +212,7 @@ static void test_simple_delayed_request_long(grpc_end2end_test_config config) {
grpc_arg arg_array[1];
arg_array[0].type = GRPC_ARG_INTEGER;
arg_array[0].key =
- const_cast<char *>("grpc.testing.fixed_reconnect_backoff_ms");
+ const_cast<char*>("grpc.testing.fixed_reconnect_backoff_ms");
arg_array[0].value.integer = 1000;
client_args.args = arg_array;
client_args.num_args = 1;
diff --git a/test/core/end2end/tests/simple_metadata.cc b/test/core/end2end/tests/simple_metadata.cc
index 17e7f696e2..3b3d5ad64c 100644
--- a/test/core/end2end/tests/simple_metadata.cc
+++ b/test/core/end2end/tests/simple_metadata.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -87,15 +87,15 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Request/response with metadata and payload.*/
static void test_request_response_with_metadata_and_payload(
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_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"),
grpc_slice_from_static_string("val1"),
@@ -115,14 +115,14 @@ static void test_request_response_with_metadata_and_payload(
{{NULL, NULL, NULL, NULL}}}};
grpc_end2end_test_fixture f = begin_test(
config, "test_request_response_with_metadata_and_payload", 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/simple_request.cc b/test/core/end2end/tests/simple_request.cc
index 48c9824894..d48010ba87 100644
--- a/test/core/end2end/tests/simple_request.cc
+++ b/test/core/end2end/tests/simple_request.cc
@@ -31,12 +31,12 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -53,14 +53,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),
@@ -71,13 +71,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);
@@ -89,11 +89,11 @@ static void end_test(grpc_end2end_test_fixture *f) {
static void simple_request_body(grpc_end2end_test_config config,
grpc_end2end_test_fixture f) {
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -102,11 +102,11 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- char *peer;
- grpc_stats_data *before =
- static_cast<grpc_stats_data *>(gpr_malloc(sizeof(grpc_stats_data)));
- grpc_stats_data *after =
- static_cast<grpc_stats_data *>(gpr_malloc(sizeof(grpc_stats_data)));
+ char* peer;
+ grpc_stats_data* before =
+ static_cast<grpc_stats_data*>(gpr_malloc(sizeof(grpc_stats_data)));
+ grpc_stats_data* after =
+ static_cast<grpc_stats_data*>(gpr_malloc(sizeof(grpc_stats_data)));
grpc_stats_collect(before);
@@ -218,7 +218,7 @@ static void simple_request_body(grpc_end2end_test_config config,
grpc_stats_collect(after);
- char *stats = grpc_stats_data_as_json(after);
+ char* stats = grpc_stats_data_as_json(after);
gpr_log(GPR_DEBUG, "%s", stats);
gpr_free(stats);
diff --git a/test/core/end2end/tests/stream_compression_compressed_payload.cc b/test/core/end2end/tests/stream_compression_compressed_payload.cc
index 8b47741cd4..3fe5200045 100644
--- a/test/core/end2end/tests/stream_compression_compressed_payload.cc
+++ b/test/core/end2end/tests/stream_compression_compressed_payload.cc
@@ -36,12 +36,12 @@
#include "src/core/lib/transport/static_metadata.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -58,14 +58,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),
@@ -76,13 +76,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);
@@ -93,30 +93,30 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void request_for_disabled_algorithm(
- grpc_end2end_test_config config, const char *test_name,
+ grpc_end2end_test_config config, const char* test_name,
uint32_t send_flags_bitmask,
grpc_stream_compression_algorithm algorithm_to_disable,
grpc_stream_compression_algorithm requested_client_compression_algorithm,
- grpc_status_code expected_error, grpc_metadata *client_metadata) {
- grpc_call *c;
- grpc_call *s;
+ grpc_status_code expected_error, grpc_metadata* client_metadata) {
+ grpc_call* c;
+ grpc_call* s;
grpc_slice request_payload_slice;
- grpc_byte_buffer *request_payload;
- grpc_channel_args *client_args;
- grpc_channel_args *server_args;
+ grpc_byte_buffer* request_payload;
+ grpc_channel_args* client_args;
+ grpc_channel_args* server_args;
grpc_end2end_test_fixture f;
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;
grpc_slice details;
int was_cancelled = 2;
- cq_verifier *cqv;
+ cq_verifier* cqv;
char str[1024];
memset(str, 'x', 1023);
@@ -229,10 +229,10 @@ static void request_for_disabled_algorithm(
/* with a certain error */
GPR_ASSERT(status == expected_error);
- const char *algo_name = NULL;
+ const char* algo_name = NULL;
GPR_ASSERT(
grpc_stream_compression_algorithm_name(algorithm_to_disable, &algo_name));
- char *expected_details = NULL;
+ char* expected_details = NULL;
gpr_asprintf(&expected_details,
"Stream compression algorithm '%s' is disabled.", algo_name);
/* and we expect a specific reason for it */
@@ -269,7 +269,7 @@ static void request_for_disabled_algorithm(
}
static void request_with_payload_template(
- grpc_end2end_test_config config, const char *test_name,
+ grpc_end2end_test_config config, const char* test_name,
uint32_t client_send_flags_bitmask,
grpc_stream_compression_algorithm
default_client_channel_compression_algorithm,
@@ -277,32 +277,32 @@ static void request_with_payload_template(
default_server_channel_compression_algorithm,
grpc_stream_compression_algorithm expected_client_compression_algorithm,
grpc_stream_compression_algorithm expected_server_compression_algorithm,
- grpc_metadata *client_init_metadata, bool set_server_level,
+ grpc_metadata* client_init_metadata, bool set_server_level,
grpc_stream_compression_level server_compression_level,
bool send_message_before_initial_metadata,
bool set_default_server_message_compression_algorithm,
grpc_compression_algorithm default_server_message_compression_algorithm) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_slice request_payload_slice;
- grpc_byte_buffer *request_payload = NULL;
- grpc_channel_args *client_args;
- grpc_channel_args *server_args;
+ grpc_byte_buffer* request_payload = NULL;
+ grpc_channel_args* client_args;
+ grpc_channel_args* server_args;
grpc_end2end_test_fixture f;
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 *response_payload;
- grpc_byte_buffer *response_payload_recv;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload;
+ grpc_byte_buffer* response_payload_recv;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- cq_verifier *cqv;
+ cq_verifier* cqv;
char request_str[1024];
char response_str[1024];
diff --git a/test/core/end2end/tests/stream_compression_payload.cc b/test/core/end2end/tests/stream_compression_payload.cc
index e47d2aa93c..038f0be738 100644
--- a/test/core/end2end/tests/stream_compression_payload.cc
+++ b/test/core/end2end/tests/stream_compression_payload.cc
@@ -23,7 +23,6 @@
#include <grpc/byte_buffer.h>
#include <grpc/compression.h>
-#include <grpc/compression.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
@@ -32,12 +31,12 @@
#include "src/core/lib/surface/call.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -54,14 +53,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),
@@ -72,13 +71,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);
@@ -93,9 +92,9 @@ static void end_test(grpc_end2end_test_fixture *f) {
static grpc_slice generate_random_slice() {
size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
- char *output;
+ char* output;
const size_t output_size = 1024 * 1024;
- output = (char *)gpr_malloc(output_size);
+ output = (char*)gpr_malloc(output_size);
for (i = 0; i < output_size - 1; ++i) {
output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
}
@@ -113,20 +112,20 @@ static void request_response_with_payload(grpc_end2end_test_config config,
grpc_slice request_payload_slice = generate_random_slice();
grpc_slice response_payload_slice = generate_random_slice();
- grpc_call *c;
- grpc_call *s;
- grpc_byte_buffer *request_payload =
+ grpc_call* c;
+ grpc_call* s;
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
@@ -265,10 +264,10 @@ static void request_response_with_payload(grpc_end2end_test_config config,
payload and status. */
static void test_invoke_request_response_with_payload(
grpc_end2end_test_config config) {
- grpc_channel_args *client_args =
+ grpc_channel_args* client_args =
grpc_channel_args_set_stream_compression_algorithm(
NULL, GRPC_STREAM_COMPRESS_GZIP);
- grpc_channel_args *server_args =
+ grpc_channel_args* server_args =
grpc_channel_args_set_stream_compression_algorithm(
NULL, GRPC_STREAM_COMPRESS_GZIP);
grpc_end2end_test_fixture f =
diff --git a/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc b/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
index 4c1a34cc64..a5321bfc61 100644
--- a/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
+++ b/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
@@ -31,12 +31,12 @@
#include "src/core/lib/surface/call.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -53,14 +53,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),
@@ -71,13 +71,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);
@@ -90,19 +90,19 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Client pings and server pongs. Repeat messages rounds before finishing. */
static void test_pingpong_streaming(grpc_end2end_test_config config,
int messages) {
- grpc_channel_args *client_args =
+ grpc_channel_args* client_args =
grpc_channel_args_set_stream_compression_algorithm(
NULL, GRPC_STREAM_COMPRESS_GZIP);
- grpc_channel_args *server_args =
+ grpc_channel_args* server_args =
grpc_channel_args_set_stream_compression_algorithm(
NULL, GRPC_STREAM_COMPRESS_GZIP);
grpc_end2end_test_fixture f =
begin_test(config, "test_pingpong_streaming", client_args, server_args);
- grpc_call *c;
- grpc_call *s;
- cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_call* c;
+ grpc_call* s;
+ 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;
@@ -111,10 +111,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- grpc_byte_buffer *request_payload;
- grpc_byte_buffer *request_payload_recv;
- grpc_byte_buffer *response_payload;
- grpc_byte_buffer *response_payload_recv;
+ grpc_byte_buffer* request_payload;
+ grpc_byte_buffer* request_payload_recv;
+ grpc_byte_buffer* response_payload;
+ grpc_byte_buffer* response_payload_recv;
int i;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
diff --git a/test/core/end2end/tests/streaming_error_response.cc b/test/core/end2end/tests/streaming_error_response.cc
index 8891b8674c..f87fd2c4c3 100644
--- a/test/core/end2end/tests/streaming_error_response.cc
+++ b/test/core/end2end/tests/streaming_error_response.cc
@@ -31,12 +31,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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,
bool request_status_early) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "Running test: %s/%s/request_status_early=%s", test_name,
@@ -55,14 +55,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),
@@ -73,13 +73,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);
@@ -91,24 +91,24 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Client sends a request with payload, server reads then returns status. */
static void test(grpc_end2end_test_config config, bool request_status_early) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_slice response_payload1_slice = grpc_slice_from_copied_string("hello");
- grpc_byte_buffer *response_payload1 =
+ grpc_byte_buffer* response_payload1 =
grpc_raw_byte_buffer_create(&response_payload1_slice, 1);
grpc_slice response_payload2_slice = grpc_slice_from_copied_string("world");
- grpc_byte_buffer *response_payload2 =
+ grpc_byte_buffer* response_payload2 =
grpc_raw_byte_buffer_create(&response_payload2_slice, 1);
grpc_end2end_test_fixture f = begin_test(config, "streaming_error_response",
NULL, NULL, request_status_early);
- 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 *response_payload1_recv = NULL;
- grpc_byte_buffer *response_payload2_recv = NULL;
+ grpc_byte_buffer* response_payload1_recv = NULL;
+ grpc_byte_buffer* response_payload2_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/trailing_metadata.cc b/test/core/end2end/tests/trailing_metadata.cc
index 7aa78a04b8..0da02a56db 100644
--- a/test/core/end2end/tests/trailing_metadata.cc
+++ b/test/core/end2end/tests/trailing_metadata.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -87,15 +87,15 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Request/response with metadata and payload.*/
static void test_request_response_with_metadata_and_payload(
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_slice response_payload_slice =
grpc_slice_from_copied_string("hello you");
- grpc_byte_buffer *request_payload =
+ grpc_byte_buffer* request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
- grpc_byte_buffer *response_payload =
+ grpc_byte_buffer* response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"),
grpc_slice_from_static_string("val1"),
@@ -123,14 +123,14 @@ static void test_request_response_with_metadata_and_payload(
{{NULL, NULL, NULL, NULL}}}};
grpc_end2end_test_fixture f = begin_test(
config, "test_request_response_with_metadata_and_payload", 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 *response_payload_recv = NULL;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/workaround_cronet_compression.cc b/test/core/end2end/tests/workaround_cronet_compression.cc
index 17e59ad6d4..8f8ca16a9e 100644
--- a/test/core/end2end/tests/workaround_cronet_compression.cc
+++ b/test/core/end2end/tests/workaround_cronet_compression.cc
@@ -36,12 +36,12 @@
#include "src/core/lib/transport/static_metadata.h"
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -58,14 +58,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),
@@ -76,13 +76,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);
@@ -93,36 +93,36 @@ static void end_test(grpc_end2end_test_fixture *f) {
}
static void request_with_payload_template(
- grpc_end2end_test_config config, const char *test_name,
+ grpc_end2end_test_config config, const char* test_name,
uint32_t client_send_flags_bitmask,
grpc_compression_algorithm default_client_channel_compression_algorithm,
grpc_compression_algorithm default_server_channel_compression_algorithm,
grpc_compression_algorithm expected_algorithm_from_client,
grpc_compression_algorithm expected_algorithm_from_server,
- grpc_metadata *client_init_metadata, bool set_server_level,
+ grpc_metadata* client_init_metadata, bool set_server_level,
grpc_compression_level server_compression_level,
- char *user_agent_override) {
- grpc_call *c;
- grpc_call *s;
+ char* user_agent_override) {
+ grpc_call* c;
+ grpc_call* s;
grpc_slice request_payload_slice;
- grpc_byte_buffer *request_payload;
- grpc_channel_args *client_args;
- grpc_channel_args *server_args;
+ grpc_byte_buffer* request_payload;
+ grpc_channel_args* client_args;
+ grpc_channel_args* server_args;
grpc_end2end_test_fixture f;
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 *response_payload;
- grpc_byte_buffer *response_payload_recv;
+ grpc_byte_buffer* request_payload_recv = NULL;
+ grpc_byte_buffer* response_payload;
+ grpc_byte_buffer* response_payload_recv;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
grpc_slice details;
int was_cancelled = 2;
- cq_verifier *cqv;
+ cq_verifier* cqv;
char request_str[1024];
char response_str[1024];
@@ -143,9 +143,9 @@ static void request_with_payload_template(
if (user_agent_override) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_channel_args *client_args_old = client_args;
+ grpc_channel_args* client_args_old = client_args;
grpc_arg arg;
- arg.key = const_cast<char *>(GRPC_ARG_PRIMARY_USER_AGENT_STRING);
+ arg.key = const_cast<char*>(GRPC_ARG_PRIMARY_USER_AGENT_STRING);
arg.type = GRPC_ARG_STRING;
arg.value.string = user_agent_override;
client_args = grpc_channel_args_copy_and_add(client_args_old, &arg, 1);
@@ -360,19 +360,19 @@ static void request_with_payload_template(
}
typedef struct workaround_cronet_compression_config {
- char *user_agent_override;
+ char* user_agent_override;
grpc_compression_algorithm expected_algorithm_from_server;
} workaround_cronet_compression_config;
static workaround_cronet_compression_config workaround_configs[] = {
{NULL, GRPC_COMPRESS_GZIP},
- {const_cast<char *>(
+ {const_cast<char*>(
"grpc-objc/1.3.0-dev grpc-c/3.0.0-dev (ios; cronet_http; gentle)"),
GRPC_COMPRESS_NONE},
- {const_cast<char *>(
+ {const_cast<char*>(
"grpc-objc/1.3.0-dev grpc-c/3.0.0-dev (ios; chttp2; gentle)"),
GRPC_COMPRESS_GZIP},
- {const_cast<char *>(
+ {const_cast<char*>(
"grpc-objc/1.4.0 grpc-c/3.0.0-dev (ios; cronet_http; gentle)"),
GRPC_COMPRESS_GZIP}};
static const size_t workaround_configs_num =
diff --git a/test/core/end2end/tests/write_buffering.cc b/test/core/end2end/tests/write_buffering.cc
index d7d1e5fa3d..5e92e598b3 100644
--- a/test/core/end2end/tests/write_buffering.cc
+++ b/test/core/end2end/tests/write_buffering.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -86,25 +86,25 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Client sends a request with payload, server reads then returns status. */
static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
- grpc_call *c;
- grpc_call *s;
+ grpc_call* c;
+ grpc_call* s;
grpc_slice request_payload_slice1 =
grpc_slice_from_copied_string("hello world");
- grpc_byte_buffer *request_payload1 =
+ grpc_byte_buffer* request_payload1 =
grpc_raw_byte_buffer_create(&request_payload_slice1, 1);
grpc_slice request_payload_slice2 = grpc_slice_from_copied_string("abc123");
- grpc_byte_buffer *request_payload2 =
+ grpc_byte_buffer* request_payload2 =
grpc_raw_byte_buffer_create(&request_payload_slice2, 1);
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_request_with_payload", 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_recv1 = NULL;
- grpc_byte_buffer *request_payload_recv2 = NULL;
+ grpc_byte_buffer* request_payload_recv1 = NULL;
+ grpc_byte_buffer* request_payload_recv2 = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
diff --git a/test/core/end2end/tests/write_buffering_at_end.cc b/test/core/end2end/tests/write_buffering_at_end.cc
index 6113843390..01dacdfd12 100644
--- a/test/core/end2end/tests/write_buffering_at_end.cc
+++ b/test/core/end2end/tests/write_buffering_at_end.cc
@@ -28,12 +28,12 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-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);
@@ -50,14 +50,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),
@@ -68,13 +68,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);
@@ -86,22 +86,22 @@ static void end_test(grpc_end2end_test_fixture *f) {
/* Client sends a request with payload, server reads then returns status. */
static void test_invoke_request_with_payload(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, "test_invoke_request_with_payload", 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_recv1 = NULL;
- grpc_byte_buffer *request_payload_recv2 = NULL;
+ grpc_byte_buffer* request_payload_recv1 = NULL;
+ grpc_byte_buffer* request_payload_recv2 = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;