aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-11-10 15:26:57 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-11-10 15:26:57 -0800
commitbe98d248419fbb22db47e8d66b884676fdaf9238 (patch)
tree5debce1183ece30043e5f583fd704e97420eba04
parent6d0ec6b382550e196ebbcd61437c3669aa505ef4 (diff)
clang-format after nullptr changes
-rw-r--r--src/core/ext/filters/client_channel/channel_connectivity.cc4
-rw-r--r--src/core/ext/filters/client_channel/client_channel.cc6
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc8
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc3
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc3
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc3
-rw-r--r--src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc4
-rw-r--r--src/core/ext/filters/client_channel/subchannel.cc2
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create.cc6
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc6
-rw-r--r--src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc6
-rw-r--r--src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc3
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc16
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.cc2
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.cc11
-rw-r--r--src/core/ext/transport/inproc/inproc_transport.cc33
-rw-r--r--src/core/lib/http/httpcli.cc4
-rw-r--r--src/core/lib/iomgr/error.cc4
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.cc4
-rw-r--r--src/core/lib/iomgr/socket_utils_common_posix.cc4
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.cc4
-rw-r--r--src/core/lib/iomgr/tcp_posix.cc3
-rw-r--r--src/core/lib/security/credentials/composite/composite_credentials.cc6
-rw-r--r--src/core/lib/security/credentials/credentials.cc9
-rw-r--r--src/core/lib/security/credentials/google_default/google_default_credentials.cc4
-rw-r--r--src/core/lib/security/credentials/jwt/json_token.cc10
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_verifier.cc9
-rw-r--r--src/core/lib/security/transport/client_auth_filter.cc4
-rw-r--r--src/core/lib/security/transport/security_connector.cc5
-rw-r--r--src/core/lib/slice/slice_intern.cc2
-rw-r--r--src/core/lib/support/avl.cc4
-rw-r--r--src/core/lib/support/sync_posix.cc8
-rw-r--r--src/core/lib/surface/call.cc7
-rw-r--r--src/core/lib/surface/channel.cc12
-rw-r--r--src/core/lib/surface/completion_queue.cc6
-rw-r--r--src/core/lib/surface/lame_client.cc4
-rw-r--r--src/core/lib/surface/server.cc4
-rw-r--r--src/core/lib/transport/metadata_batch.cc3
-rw-r--r--src/core/lib/transport/service_config.cc4
-rw-r--r--src/core/lib/transport/transport.cc3
-rw-r--r--src/core/tsi/fake_transport_security.cc6
-rw-r--r--src/core/tsi/ssl_transport_security.cc14
-rw-r--r--src/core/tsi/transport_security.cc20
-rw-r--r--src/core/tsi/transport_security_adapter.cc3
-rw-r--r--src/cpp/client/create_channel.cc10
-rw-r--r--test/core/bad_client/bad_client.cc12
-rw-r--r--test/core/bad_client/tests/connection_prefix.cc3
-rw-r--r--test/core/bad_client/tests/headers.cc3
-rw-r--r--test/core/bad_client/tests/initial_settings_frame.cc3
-rw-r--r--test/core/bad_ssl/server_common.cc8
-rw-r--r--test/core/bad_ssl/servers/alpn.cc4
-rw-r--r--test/core/bad_ssl/servers/cert.cc4
-rw-r--r--test/core/channel/minimal_stack_is_minimal_test.cc13
-rw-r--r--test/core/client_channel/lb_policies_test.cc40
-rw-r--r--test/core/client_channel/parse_address_test.cc4
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc3
-rw-r--r--test/core/end2end/bad_server_response_test.cc4
-rw-r--r--test/core/end2end/connection_refused_test.cc18
-rw-r--r--test/core/end2end/cq_verifier.cc3
-rw-r--r--test/core/end2end/dualstack_socket_test.cc3
-rw-r--r--test/core/end2end/fixtures/h2_census.cc3
-rw-r--r--test/core/end2end/fixtures/h2_compress.cc4
-rw-r--r--test/core/end2end/fixtures/h2_fakesec.cc3
-rw-r--r--test/core/end2end/fixtures/h2_full+pipe.cc3
-rw-r--r--test/core/end2end/fixtures/h2_full+trace.cc3
-rw-r--r--test/core/end2end/fixtures/h2_full+workarounds.cc3
-rw-r--r--test/core/end2end/fixtures/h2_full.cc3
-rw-r--r--test/core/end2end/fixtures/h2_http_proxy.cc3
-rw-r--r--test/core/end2end/fixtures/h2_load_reporting.cc3
-rw-r--r--test/core/end2end/fixtures/h2_oauth2.cc7
-rw-r--r--test/core/end2end/fixtures/h2_ssl.cc7
-rw-r--r--test/core/end2end/fixtures/h2_ssl_proxy.cc11
-rw-r--r--test/core/end2end/fixtures/h2_uds.cc3
-rw-r--r--test/core/end2end/fixtures/http_proxy_fixture.cc4
-rw-r--r--test/core/end2end/fixtures/proxy.cc19
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.cc31
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer.cc9
-rw-r--r--test/core/end2end/fuzzers/server_fuzzer.cc9
-rw-r--r--test/core/end2end/goaway_server_test.cc3
-rw-r--r--test/core/end2end/invalid_call_argument_test.cc66
-rw-r--r--test/core/end2end/no_server_test.cc11
-rw-r--r--test/core/end2end/tests/binary_metadata.cc5
-rw-r--r--test/core/end2end/tests/call_creds.cc4
-rw-r--r--test/core/end2end/tests/cancel_after_client_done.cc5
-rw-r--r--test/core/end2end/tests/cancel_after_round_trip.cc5
-rw-r--r--test/core/end2end/tests/cancel_with_status.cc3
-rw-r--r--test/core/end2end/tests/compressed_payload.cc28
-rw-r--r--test/core/end2end/tests/filter_latency.cc4
-rw-r--r--test/core/end2end/tests/graceful_server_shutdown.cc5
-rw-r--r--test/core/end2end/tests/max_message_length.cc12
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.cc6
-rw-r--r--test/core/end2end/tests/shutdown_finishes_calls.cc5
-rw-r--r--test/core/end2end/tests/simple_cacheable_request.cc4
-rw-r--r--test/core/end2end/tests/simple_metadata.cc5
-rw-r--r--test/core/end2end/tests/stream_compression_compressed_payload.cc13
-rw-r--r--test/core/end2end/tests/stream_compression_ping_pong_streaming.cc6
-rw-r--r--test/core/end2end/tests/streaming_error_response.cc5
-rw-r--r--test/core/end2end/tests/trailing_metadata.cc5
-rw-r--r--test/core/end2end/tests/workaround_cronet_compression.cc6
-rw-r--r--test/core/fling/server.cc8
-rw-r--r--test/core/http/httpcli_test.cc3
-rw-r--r--test/core/http/httpscli_test.cc3
-rw-r--r--test/core/iomgr/endpoint_tests.cc4
-rw-r--r--test/core/iomgr/fd_posix_test.cc31
-rw-r--r--test/core/iomgr/resource_quota_test.cc17
-rw-r--r--test/core/iomgr/tcp_client_posix_test.cc12
-rw-r--r--test/core/iomgr/tcp_posix_test.cc12
-rw-r--r--test/core/iomgr/tcp_server_posix_test.cc4
-rw-r--r--test/core/iomgr/udp_server_test.cc8
-rw-r--r--test/core/json/json_stream_error_test.cc2
-rw-r--r--test/core/memory_usage/client.cc10
-rw-r--r--test/core/memory_usage/server.cc14
-rw-r--r--test/core/security/credentials_test.cc58
-rw-r--r--test/core/security/fetch_oauth2.cc3
-rw-r--r--test/core/security/json_token_test.cc6
-rw-r--r--test/core/security/secure_endpoint_test.cc10
-rw-r--r--test/core/support/alloc_test.cc3
-rw-r--r--test/core/surface/alarm_test.cc12
-rw-r--r--test/core/surface/completion_queue_test.cc31
-rw-r--r--test/core/surface/completion_queue_threading_test.cc8
-rw-r--r--test/core/surface/concurrent_connectivity_test.cc12
-rw-r--r--test/core/surface/lame_client_test.cc7
-rw-r--r--test/core/surface/num_external_connectivity_watchers_test.cc20
-rw-r--r--test/core/surface/secure_channel_create_test.cc6
-rw-r--r--test/core/surface/sequential_connectivity_test.cc10
-rw-r--r--test/core/surface/server_test.cc12
-rw-r--r--test/core/tsi/ssl_transport_security_test.cc13
-rw-r--r--test/core/tsi/transport_security_test.cc39
-rw-r--r--test/core/tsi/transport_security_test_lib.cc9
-rw-r--r--test/core/util/test_config.cc2
-rw-r--r--test/core/util/trickle_endpoint.cc5
-rw-r--r--test/cpp/end2end/client_lb_end2end_test.cc3
-rw-r--r--test/cpp/grpclb/grpclb_test.cc24
-rw-r--r--test/cpp/microbenchmarks/bm_call_create.cc19
-rw-r--r--test/cpp/microbenchmarks/bm_closure.cc18
-rw-r--r--test/cpp/microbenchmarks/bm_cq.cc3
-rw-r--r--test/cpp/microbenchmarks/bm_error.cc4
-rw-r--r--test/cpp/microbenchmarks/bm_pollset.cc7
-rw-r--r--test/cpp/microbenchmarks/fullstack_fixtures.h6
-rw-r--r--test/cpp/naming/resolver_component_test.cc3
-rw-r--r--test/cpp/util/grpc_tool_test.cc16
141 files changed, 724 insertions, 528 deletions
diff --git a/src/core/ext/filters/client_channel/channel_connectivity.cc b/src/core/ext/filters/client_channel/channel_connectivity.cc
index 0538e00a6f..d3627a237f 100644
--- a/src/core/ext/filters/client_channel/channel_connectivity.cc
+++ b/src/core/ext/filters/client_channel/channel_connectivity.cc
@@ -115,8 +115,8 @@ static void partly_done(grpc_exec_ctx* exec_ctx, state_watcher* w,
grpc_channel_get_channel_stack(w->channel));
grpc_client_channel_watch_connectivity_state(
exec_ctx, client_channel_elem,
- grpc_polling_entity_create_from_pollset(grpc_cq_pollset(w->cq)), nullptr,
- &w->on_complete, nullptr);
+ grpc_polling_entity_create_from_pollset(grpc_cq_pollset(w->cq)),
+ nullptr, &w->on_complete, nullptr);
}
gpr_mu_lock(&w->mu);
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
index 075c569f61..8b8d512432 100644
--- a/src/core/ext/filters/client_channel/client_channel.cc
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -266,7 +266,8 @@ static void on_lb_policy_state_changed_locked(grpc_exec_ctx* exec_ctx,
gpr_log(GPR_DEBUG, "chand=%p: lb_policy=%p state changed to %s", w->chand,
w->lb_policy, grpc_connectivity_state_name(w->state));
}
- if (publish_state == GRPC_CHANNEL_SHUTDOWN && w->chand->resolver != nullptr) {
+ if (publish_state == GRPC_CHANNEL_SHUTDOWN &&
+ w->chand->resolver != nullptr) {
publish_state = GRPC_CHANNEL_TRANSIENT_FAILURE;
grpc_resolver_channel_saw_error_locked(exec_ctx, w->chand->resolver);
GRPC_LB_POLICY_UNREF(exec_ctx, w->chand->lb_policy, "channel");
@@ -408,7 +409,8 @@ static void on_resolver_result_changed_locked(grpc_exec_ctx* exec_ctx,
}
}
if (found_balancer_address) {
- if (lb_policy_name != nullptr && strcmp(lb_policy_name, "grpclb") != 0) {
+ if (lb_policy_name != nullptr &&
+ strcmp(lb_policy_name, "grpclb") != 0) {
gpr_log(GPR_INFO,
"resolver requested LB policy %s but provided at least one "
"balancer address -- forcing use of grpclb LB policy",
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 195d95aad0..e9bef8a921 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -1178,8 +1178,8 @@ static int glb_pick_locked(grpc_exec_ctx* exec_ctx, grpc_lb_policy* pol,
bool pick_done = false;
if (glb_policy->rr_policy != nullptr) {
const grpc_connectivity_state rr_connectivity_state =
- grpc_lb_policy_check_connectivity_locked(exec_ctx,
- glb_policy->rr_policy, nullptr);
+ grpc_lb_policy_check_connectivity_locked(
+ exec_ctx, glb_policy->rr_policy, nullptr);
// The glb_policy->rr_policy may have transitioned to SHUTDOWN but the
// callback registered to capture this event
// (glb_rr_connectivity_changed_locked) may not have been invoked yet. We
@@ -1525,8 +1525,8 @@ static void query_for_backends_locked(grpc_exec_ctx* exec_ctx,
op->flags = 0;
op->reserved = nullptr;
op++;
- call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call,
- ops, (size_t)(op - ops), nullptr);
+ call_error = grpc_call_start_batch_and_execute(
+ exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), nullptr);
GPR_ASSERT(GRPC_CALL_OK == call_error);
op = ops;
diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
index 2287740b82..caa6aee9a6 100644
--- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
@@ -155,7 +155,8 @@ static void pf_cancel_picks_locked(grpc_exec_ctx* exec_ctx, grpc_lb_policy* pol,
static void start_picking_locked(grpc_exec_ctx* exec_ctx,
pick_first_lb_policy* p) {
p->started_picking = true;
- if (p->subchannel_list != nullptr && p->subchannel_list->num_subchannels > 0) {
+ if (p->subchannel_list != nullptr &&
+ p->subchannel_list->num_subchannels > 0) {
p->subchannel_list->checking_subchannel = 0;
grpc_lb_subchannel_list_ref_for_connectivity_watch(
p->subchannel_list, "connectivity_watch+start_picking");
diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc
index f53abb7d96..27d9598ac4 100644
--- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc
@@ -240,7 +240,8 @@ static void subchannel_data_cancel_connectivity_watch(
(size_t)(sd - sd->subchannel_list->subchannels),
sd->subchannel_list->num_subchannels, sd->subchannel, reason);
}
- grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, nullptr, nullptr,
+ grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, nullptr,
+ nullptr,
&sd->connectivity_changed_closure);
}
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index 5f91fe05af..07737b19d2 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -177,7 +177,8 @@ static char* choose_service_config(char* service_config_choice_json) {
break;
}
grpc_json* service_config_json = nullptr;
- for (grpc_json* field = choice->child; field != nullptr; field = field->next) {
+ for (grpc_json* field = choice->child; field != nullptr;
+ field = field->next) {
// Check client language, if specified.
if (strcmp(field->key, "clientLanguage") == 0) {
if (field->type != GRPC_JSON_ARRAY ||
diff --git a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
index 82afd1d8b7..1da8ab9161 100644
--- a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
@@ -157,8 +157,8 @@ static grpc_resolver* sockaddr_create(grpc_exec_ctx* exec_ctx,
grpc_slice_buffer path_parts;
grpc_slice_buffer_init(&path_parts);
grpc_slice_split(path_slice, ",", &path_parts);
- grpc_lb_addresses* addresses =
- grpc_lb_addresses_create(path_parts.count, nullptr /* user_data_vtable */);
+ grpc_lb_addresses* addresses = grpc_lb_addresses_create(
+ path_parts.count, nullptr /* user_data_vtable */);
bool errors_found = false;
for (size_t i = 0; i < addresses->num_addresses; i++) {
grpc_uri ith_uri = *args->uri;
diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc
index f0d61e2893..2720e68040 100644
--- a/src/core/ext/filters/client_channel/subchannel.cc
+++ b/src/core/ext/filters/client_channel/subchannel.cc
@@ -756,7 +756,7 @@ grpc_error* grpc_connected_subchannel_create_call(
(*call)->connection = GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
const grpc_call_element_args call_args = {
callstk, /* call_stack */
- nullptr, /* server_transport_data */
+ nullptr, /* server_transport_data */
args->context, /* context */
args->path, /* path */
args->start_time, /* start_time */
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
index a5cd5d5294..028b69e5ff 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
@@ -99,7 +99,7 @@ grpc_channel* grpc_insecure_channel_create(const char* target,
grpc_channel_args_destroy(&exec_ctx, new_args);
grpc_exec_ctx_finish(&exec_ctx);
return channel != nullptr ? channel
- : grpc_lame_client_channel_create(
- target, GRPC_STATUS_INTERNAL,
- "Failed to create client channel");
+ : grpc_lame_client_channel_create(
+ target, GRPC_STATUS_INTERNAL,
+ "Failed to create client channel");
}
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
index aa3d0d1404..e748d28964 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
@@ -63,9 +63,9 @@ grpc_channel* grpc_insecure_channel_create_from_fd(
grpc_exec_ctx_finish(&exec_ctx);
return channel != nullptr ? channel
- : grpc_lame_client_channel_create(
- target, GRPC_STATUS_INTERNAL,
- "Failed to create client channel");
+ : grpc_lame_client_channel_create(
+ target, GRPC_STATUS_INTERNAL,
+ "Failed to create client channel");
}
#else // !GPR_SUPPORT_CHANNELS_FROM_FD
diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
index 7e23c56643..dd2bc427a7 100644
--- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
+++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
@@ -218,7 +218,7 @@ grpc_channel* grpc_secure_channel_create(grpc_channel_credentials* creds,
grpc_exec_ctx_finish(&exec_ctx);
}
return channel != nullptr ? channel
- : grpc_lame_client_channel_create(
- target, GRPC_STATUS_INTERNAL,
- "Failed to create secure client channel");
+ : grpc_lame_client_channel_create(
+ target, GRPC_STATUS_INTERNAL,
+ "Failed to create secure client channel");
}
diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
index 2206e4a4f6..007d1be50c 100644
--- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
+++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
@@ -60,7 +60,8 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server* server,
grpc_endpoint_add_to_pollset(&exec_ctx, server_endpoint, pollsets[i]);
}
- grpc_server_setup_transport(&exec_ctx, server, transport, nullptr, server_args);
+ grpc_server_setup_transport(&exec_ctx, server, transport, nullptr,
+ server_args);
grpc_chttp2_transport_start_reading(&exec_ctx, transport, nullptr);
grpc_exec_ctx_finish(&exec_ctx);
}
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index c92fdb7127..43788bfc5c 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -1761,8 +1761,8 @@ static void send_goaway(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
t->sent_goaway_state = GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED;
grpc_http2_error_code http_error;
grpc_slice slice;
- grpc_error_get_status(exec_ctx, error, GRPC_MILLIS_INF_FUTURE, nullptr, &slice,
- &http_error);
+ grpc_error_get_status(exec_ctx, error, GRPC_MILLIS_INF_FUTURE, nullptr,
+ &slice, &http_error);
grpc_chttp2_goaway_append(t->last_new_stream_id, (uint32_t)http_error,
grpc_slice_ref_internal(slice), &t->qbuf);
grpc_chttp2_initiate_write(exec_ctx, t,
@@ -1980,10 +1980,10 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx* exec_ctx,
s->stream_decompression_ctx = grpc_stream_compression_context_create(
s->stream_decompression_method);
}
- if (!grpc_stream_decompress(s->stream_decompression_ctx,
- &s->frame_storage,
- &s->unprocessed_incoming_frames_buffer, nullptr,
- GRPC_HEADER_SIZE_IN_BYTES, &end_of_context)) {
+ if (!grpc_stream_decompress(
+ s->stream_decompression_ctx, &s->frame_storage,
+ &s->unprocessed_incoming_frames_buffer, nullptr,
+ GRPC_HEADER_SIZE_IN_BYTES, &end_of_context)) {
grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage);
grpc_slice_buffer_reset_and_unref_internal(
exec_ctx, &s->unprocessed_incoming_frames_buffer);
@@ -2064,8 +2064,8 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx* exec_ctx,
if (!s->read_closed || !s->write_closed) {
if (s->id != 0) {
grpc_http2_error_code http_error;
- grpc_error_get_status(exec_ctx, due_to_error, s->deadline, nullptr, nullptr,
- &http_error);
+ grpc_error_get_status(exec_ctx, due_to_error, s->deadline, nullptr,
+ nullptr, &http_error);
grpc_slice_buffer_add(
&t->qbuf, grpc_chttp2_rst_stream_create(s->id, (uint32_t)http_error,
&s->stats.outgoing));
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
index 33e4fc415a..e6e4ff24a3 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
@@ -54,7 +54,7 @@
static grpc_slice_refcount terminal_slice_refcount = {nullptr, nullptr};
static const grpc_slice terminal_slice = {
&terminal_slice_refcount, /* refcount */
- {{nullptr, 0}} /* data.refcounted */
+ {{nullptr, 0}} /* data.refcounted */
};
extern "C" grpc_tracer_flag grpc_http_trace;
diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc
index db9fb21333..61a2598618 100644
--- a/src/core/ext/transport/chttp2/transport/writing.cc
+++ b/src/core/ext/transport/chttp2/transport/writing.cc
@@ -333,10 +333,10 @@ class DataSendContext {
s_->fetching_send_message == nullptr);
if (is_last_data_frame && s_->send_trailing_metadata != nullptr &&
s_->stream_compression_ctx != nullptr) {
- if (!grpc_stream_compress(s_->stream_compression_ctx,
- &s_->flow_controlled_buffer,
- &s_->compressed_data_buffer, nullptr, MAX_SIZE_T,
- GRPC_STREAM_COMPRESSION_FLUSH_FINISH)) {
+ if (!grpc_stream_compress(
+ s_->stream_compression_ctx, &s_->flow_controlled_buffer,
+ &s_->compressed_data_buffer, nullptr, MAX_SIZE_T,
+ GRPC_STREAM_COMPRESSION_FLUSH_FINISH)) {
gpr_log(GPR_ERROR, "Stream compression failed.");
}
grpc_stream_compression_context_destroy(s_->stream_compression_ctx);
@@ -347,7 +347,8 @@ class DataSendContext {
* recalculated. */
return;
}
- is_last_frame_ = is_last_data_frame && s_->send_trailing_metadata != nullptr &&
+ is_last_frame_ = is_last_data_frame &&
+ s_->send_trailing_metadata != nullptr &&
grpc_metadata_batch_is_empty(s_->send_trailing_metadata);
grpc_chttp2_encode_data(s_->id, &s_->compressed_data_buffer, send_bytes,
is_last_frame_, &s_->stats.outgoing, &t_->outbuf);
diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc
index a629942c2d..7ea08b05bb 100644
--- a/src/core/ext/transport/inproc/inproc_transport.cc
+++ b/src/core/ext/transport/inproc/inproc_transport.cc
@@ -410,10 +410,11 @@ static void fail_helper_locked(grpc_exec_ctx* exec_ctx, inproc_stream* s,
grpc_metadata_batch_init(&fake_md);
inproc_stream* other = s->other_side;
- grpc_metadata_batch* dest = (other == nullptr) ? &s->write_buffer_trailing_md
- : &other->to_read_trailing_md;
+ grpc_metadata_batch* dest = (other == nullptr)
+ ? &s->write_buffer_trailing_md
+ : &other->to_read_trailing_md;
bool* destfilled = (other == nullptr) ? &s->write_buffer_trailing_md_filled
- : &other->to_read_trailing_md_filled;
+ : &other->to_read_trailing_md_filled;
fill_in_metadata(exec_ctx, s, &fake_md, 0, dest, nullptr, destfilled);
grpc_metadata_batch_destroy(exec_ctx, &fake_md);
@@ -612,10 +613,11 @@ static void op_state_machine(grpc_exec_ctx* exec_ctx, void* arg,
(!s->send_message_op ||
(s->t->is_client &&
(s->trailing_md_recvd || s->to_read_trailing_md_filled)))) {
- grpc_metadata_batch* dest = (other == nullptr) ? &s->write_buffer_trailing_md
- : &other->to_read_trailing_md;
+ grpc_metadata_batch* dest = (other == nullptr)
+ ? &s->write_buffer_trailing_md
+ : &other->to_read_trailing_md;
bool* destfilled = (other == nullptr) ? &s->write_buffer_trailing_md_filled
- : &other->to_read_trailing_md_filled;
+ : &other->to_read_trailing_md_filled;
if (*destfilled || s->trailing_md_sent) {
// The buffer is already in use; that's an error!
INPROC_LOG(GPR_DEBUG, "Extra trailing metadata %p", s);
@@ -827,10 +829,11 @@ static bool cancel_stream_locked(grpc_exec_ctx* exec_ctx, inproc_stream* s,
grpc_metadata_batch_init(&cancel_md);
inproc_stream* other = s->other_side;
- grpc_metadata_batch* dest = (other == nullptr) ? &s->write_buffer_trailing_md
- : &other->to_read_trailing_md;
+ grpc_metadata_batch* dest = (other == nullptr)
+ ? &s->write_buffer_trailing_md
+ : &other->to_read_trailing_md;
bool* destfilled = (other == nullptr) ? &s->write_buffer_trailing_md_filled
- : &other->to_read_trailing_md_filled;
+ : &other->to_read_trailing_md_filled;
fill_in_metadata(exec_ctx, s, &cancel_md, 0, dest, nullptr, destfilled);
grpc_metadata_batch_destroy(exec_ctx, &cancel_md);
@@ -914,12 +917,14 @@ static void perform_stream_op(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Endpoint already shutdown");
}
if (error == GRPC_ERROR_NONE && op->send_initial_metadata) {
- grpc_metadata_batch* dest = (other == nullptr) ? &s->write_buffer_initial_md
- : &other->to_read_initial_md;
- uint32_t* destflags = (other == nullptr) ? &s->write_buffer_initial_md_flags
- : &other->to_read_initial_md_flags;
+ grpc_metadata_batch* dest = (other == nullptr)
+ ? &s->write_buffer_initial_md
+ : &other->to_read_initial_md;
+ uint32_t* destflags = (other == nullptr)
+ ? &s->write_buffer_initial_md_flags
+ : &other->to_read_initial_md_flags;
bool* destfilled = (other == nullptr) ? &s->write_buffer_initial_md_filled
- : &other->to_read_initial_md_filled;
+ : &other->to_read_initial_md_filled;
if (*destfilled || s->initial_md_sent) {
// The buffer is already in use; that's an error!
INPROC_LOG(GPR_DEBUG, "Extra initial metadata %p", s);
diff --git a/src/core/lib/http/httpcli.cc b/src/core/lib/http/httpcli.cc
index 4b10a624da..73b484b06d 100644
--- a/src/core/lib/http/httpcli.cc
+++ b/src/core/lib/http/httpcli.cc
@@ -136,8 +136,8 @@ static void on_read(grpc_exec_ctx* exec_ctx, void* user_data,
for (i = 0; i < req->incoming.count; i++) {
if (GRPC_SLICE_LENGTH(req->incoming.slices[i])) {
req->have_read_byte = 1;
- grpc_error* err =
- grpc_http_parser_parse(&req->parser, req->incoming.slices[i], nullptr);
+ grpc_error* err = grpc_http_parser_parse(
+ &req->parser, req->incoming.slices[i], nullptr);
if (err != GRPC_ERROR_NONE) {
finish(exec_ctx, req, err);
return;
diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc
index d4cc1ac52b..581b903f1a 100644
--- a/src/core/lib/iomgr/error.cc
+++ b/src/core/lib/iomgr/error.cc
@@ -767,8 +767,8 @@ grpc_error* grpc_os_error(const char* file, int line, int err,
grpc_error_set_str(
grpc_error_set_int(
grpc_error_create(file, line,
- grpc_slice_from_static_string("OS Error"), nullptr,
- 0),
+ grpc_slice_from_static_string("OS Error"),
+ nullptr, 0),
GRPC_ERROR_INT_ERRNO, err),
GRPC_ERROR_STR_OS_ERROR,
grpc_slice_from_static_string(strerror(err))),
diff --git a/src/core/lib/iomgr/sockaddr_utils.cc b/src/core/lib/iomgr/sockaddr_utils.cc
index e01dc4e65c..3477fb52cd 100644
--- a/src/core/lib/iomgr/sockaddr_utils.cc
+++ b/src/core/lib/iomgr/sockaddr_utils.cc
@@ -167,8 +167,8 @@ int grpc_sockaddr_to_string(char** out,
port = ntohs(addr6->sin6_port);
sin6_scope_id = addr6->sin6_scope_id;
}
- if (ip != nullptr &&
- grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) != nullptr) {
+ if (ip != nullptr && grpc_inet_ntop(addr->sa_family, ip, ntop_buf,
+ sizeof(ntop_buf)) != nullptr) {
if (sin6_scope_id != 0) {
char* host_with_scope;
/* Enclose sin6_scope_id with the format defined in RFC 6784 section 2. */
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc
index d87aba3af2..2d4b8f0add 100644
--- a/src/core/lib/iomgr/socket_utils_common_posix.cc
+++ b/src/core/lib/iomgr/socket_utils_common_posix.cc
@@ -263,8 +263,8 @@ static grpc_error* error_for_fd(int fd, const grpc_resolved_address* addr) {
grpc_error* grpc_create_dualstack_socket(
const grpc_resolved_address* resolved_addr, int type, int protocol,
grpc_dualstack_mode* dsmode, int* newfd) {
- return grpc_create_dualstack_socket_using_factory(nullptr, resolved_addr, type,
- protocol, dsmode, newfd);
+ return grpc_create_dualstack_socket_using_factory(
+ nullptr, resolved_addr, type, protocol, dsmode, newfd);
}
static int create_socket(grpc_socket_factory* factory, int domain, int type,
diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc
index 85a4c29497..cb0f627c94 100644
--- a/src/core/lib/iomgr/tcp_client_posix.cc
+++ b/src/core/lib/iomgr/tcp_client_posix.cc
@@ -296,8 +296,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx* exec_ctx,
}
if (errno != EWOULDBLOCK && errno != EINPROGRESS) {
- grpc_fd_orphan(exec_ctx, fdobj, nullptr, nullptr, false /* already_closed */,
- "tcp_client_connect_error");
+ grpc_fd_orphan(exec_ctx, fdobj, nullptr, nullptr,
+ false /* already_closed */, "tcp_client_connect_error");
GRPC_CLOSURE_SCHED(exec_ctx, closure, GRPC_OS_ERROR(errno, "connect"));
goto done;
}
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc
index 104d233c15..cb90933e31 100644
--- a/src/core/lib/iomgr/tcp_posix.cc
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -198,7 +198,8 @@ static void cover_self(grpc_exec_ctx* exec_ctx, grpc_tcp* tcp) {
grpc_executor_scheduler(GRPC_EXECUTOR_LONG)),
GRPC_ERROR_NONE);
} else {
- while ((p = (backup_poller*)gpr_atm_acq_load(&g_backup_poller)) == nullptr) {
+ while ((p = (backup_poller*)gpr_atm_acq_load(&g_backup_poller)) ==
+ nullptr) {
// spin waiting for backup poller
}
}
diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc
index 867b851dc1..93dd721240 100644
--- a/src/core/lib/security/credentials/composite/composite_credentials.cc
+++ b/src/core/lib/security/credentials/composite/composite_credentials.cc
@@ -224,7 +224,8 @@ static grpc_security_status composite_channel_create_security_connector(
downstream. */
if (call_creds != nullptr) {
grpc_call_credentials* composite_call_creds =
- grpc_composite_call_credentials_create(c->call_creds, call_creds, nullptr);
+ grpc_composite_call_credentials_create(c->call_creds, call_creds,
+ nullptr);
status = c->inner_creds->vtable->create_security_connector(
exec_ctx, c->inner_creds, composite_call_creds, target, args, sc,
new_args);
@@ -253,7 +254,8 @@ grpc_channel_credentials* grpc_composite_channel_credentials_create(
void* reserved) {
grpc_composite_channel_credentials* c =
(grpc_composite_channel_credentials*)gpr_zalloc(sizeof(*c));
- GPR_ASSERT(channel_creds != nullptr && call_creds != nullptr && reserved == nullptr);
+ GPR_ASSERT(channel_creds != nullptr && call_creds != nullptr &&
+ reserved == nullptr);
GRPC_API_TRACE(
"grpc_composite_channel_credentials_create(channel_creds=%p, "
"call_creds=%p, reserved=%p)",
diff --git a/src/core/lib/security/credentials/credentials.cc b/src/core/lib/security/credentials/credentials.cc
index b29abdc6aa..90576e69b9 100644
--- a/src/core/lib/security/credentials/credentials.cc
+++ b/src/core/lib/security/credentials/credentials.cc
@@ -117,7 +117,8 @@ bool grpc_call_credentials_get_request_metadata(
void grpc_call_credentials_cancel_get_request_metadata(
grpc_exec_ctx* exec_ctx, grpc_call_credentials* creds,
grpc_credentials_mdelem_array* md_array, grpc_error* error) {
- if (creds == nullptr || creds->vtable->cancel_get_request_metadata == nullptr) {
+ if (creds == nullptr ||
+ creds->vtable->cancel_get_request_metadata == nullptr) {
return;
}
creds->vtable->cancel_get_request_metadata(exec_ctx, creds, md_array, error);
@@ -206,7 +207,8 @@ void grpc_server_credentials_unref(grpc_exec_ctx* exec_ctx,
if (creds->vtable->destruct != nullptr) {
creds->vtable->destruct(exec_ctx, creds);
}
- if (creds->processor.destroy != nullptr && creds->processor.state != nullptr) {
+ if (creds->processor.destroy != nullptr &&
+ creds->processor.state != nullptr) {
creds->processor.destroy(creds->processor.state);
}
gpr_free(creds);
@@ -238,7 +240,8 @@ void grpc_server_credentials_set_auth_metadata_processor(
"processor=grpc_auth_metadata_processor { process: %p, state: %p })",
3, (creds, (void*)(intptr_t)processor.process, processor.state));
if (creds == nullptr) return;
- if (creds->processor.destroy != nullptr && creds->processor.state != nullptr) {
+ if (creds->processor.destroy != nullptr &&
+ creds->processor.state != nullptr) {
creds->processor.destroy(creds->processor.state);
}
creds->processor = processor;
diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc
index b4df1dc116..f586c7b604 100644
--- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc
+++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc
@@ -80,8 +80,8 @@ static void on_compute_engine_detection_http_response(grpc_exec_ctx* exec_ctx,
detector->is_done = 1;
GRPC_LOG_IF_ERROR(
"Pollset kick",
- grpc_pollset_kick(exec_ctx,
- grpc_polling_entity_pollset(&detector->pollent), nullptr));
+ grpc_pollset_kick(
+ exec_ctx, grpc_polling_entity_pollset(&detector->pollent), nullptr));
gpr_mu_unlock(g_polling_mu);
}
diff --git a/src/core/lib/security/credentials/jwt/json_token.cc b/src/core/lib/security/credentials/jwt/json_token.cc
index 07807201ce..a152ddcaaf 100644
--- a/src/core/lib/security/credentials/jwt/json_token.cc
+++ b/src/core/lib/security/credentials/jwt/json_token.cc
@@ -52,7 +52,8 @@ gpr_timespec grpc_max_auth_token_lifetime() {
/* --- Override for testing. --- */
-static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override = nullptr;
+static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override =
+ nullptr;
/* --- grpc_auth_json_key. --- */
@@ -99,7 +100,8 @@ grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json* json) {
gpr_log(GPR_ERROR, "Could not write into openssl BIO.");
goto end;
}
- result.private_key = PEM_read_bio_RSAPrivateKey(bio, nullptr, nullptr, (void*)"");
+ result.private_key =
+ PEM_read_bio_RSAPrivateKey(bio, nullptr, nullptr, (void*)"");
if (result.private_key == nullptr) {
gpr_log(GPR_ERROR, "Could not deserialize private key.");
goto end;
@@ -192,8 +194,8 @@ static char* encoded_jwt_claim(const grpc_auth_json_key* json_key,
int64_ttoa(now.tv_sec, now_str);
int64_ttoa(expiration.tv_sec, expiration_str);
- child =
- create_child(nullptr, json, "iss", json_key->client_email, GRPC_JSON_STRING);
+ child = create_child(nullptr, json, "iss", json_key->client_email,
+ GRPC_JSON_STRING);
if (scope != nullptr) {
child = create_child(child, json, "scope", scope, GRPC_JSON_STRING);
} else {
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc
index 105178ff4c..3709b83c4e 100644
--- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc
+++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc
@@ -576,7 +576,8 @@ static EVP_PKEY* find_verification_key(grpc_exec_ctx* exec_ctx,
const char* kty = nullptr;
if (jkey->type != GRPC_JSON_OBJECT) continue;
- for (key_prop = jkey->child; key_prop != nullptr; key_prop = key_prop->next) {
+ for (key_prop = jkey->child; key_prop != nullptr;
+ key_prop = key_prop->next) {
if (strcmp(key_prop->key, "alg") == 0 &&
key_prop->type == GRPC_JSON_STRING) {
alg = key_prop->value;
@@ -783,7 +784,8 @@ static void retrieve_key_and_verify(grpc_exec_ctx* exec_ctx,
req.handshaker = &grpc_httpcli_ssl;
http_response_index rsp_idx;
- GPR_ASSERT(ctx != nullptr && ctx->header != nullptr && ctx->claims != nullptr);
+ GPR_ASSERT(ctx != nullptr && ctx->header != nullptr &&
+ ctx->claims != nullptr);
iss = ctx->claims->iss;
if (ctx->header->kid == nullptr) {
gpr_log(GPR_ERROR, "Missing kid in jose header.");
@@ -869,7 +871,8 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx* exec_ctx,
size_t signed_jwt_len;
const char* cur = jwt;
- GPR_ASSERT(verifier != nullptr && jwt != nullptr && audience != nullptr && cb != nullptr);
+ GPR_ASSERT(verifier != nullptr && jwt != nullptr && audience != nullptr &&
+ cb != nullptr);
dot = strchr(cur, '.');
if (dot == nullptr) goto error;
json = parse_json_part_from_jwt(exec_ctx, cur, (size_t)(dot - cur),
diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc
index 0ea33de6ca..326f4d7773 100644
--- a/src/core/lib/security/transport/client_auth_filter.cc
+++ b/src/core/lib/security/transport/client_auth_filter.cc
@@ -146,8 +146,8 @@ void grpc_auth_metadata_context_build(
*port_delimiter = '\0';
}
}
- gpr_asprintf(&service_url, "%s://%s%s", url_scheme == nullptr ? "" : url_scheme,
- host_and_port, service);
+ gpr_asprintf(&service_url, "%s://%s%s",
+ url_scheme == nullptr ? "" : url_scheme, host_and_port, service);
auth_md_context->service_url = service_url;
auth_md_context->method_name = method_name;
auth_md_context->channel_auth_context =
diff --git a/src/core/lib/security/transport/security_connector.cc b/src/core/lib/security/transport/security_connector.cc
index 0e89d005a0..b996cc8cdb 100644
--- a/src/core/lib/security/transport/security_connector.cc
+++ b/src/core/lib/security/transport/security_connector.cc
@@ -600,7 +600,7 @@ static void ssl_channel_add_handshakers(grpc_exec_ctx* exec_ctx,
tsi_result result = tsi_ssl_client_handshaker_factory_create_handshaker(
c->client_handshaker_factory,
c->overridden_target_name != nullptr ? c->overridden_target_name
- : c->target_name,
+ : c->target_name,
&tsi_hs);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.",
@@ -911,7 +911,8 @@ static bool ssl_channel_check_call_host(grpc_exec_ctx* exec_ctx,
/* If the target name was overridden, then the original target_name was
'checked' transitively during the previous peer check at the end of the
handshake. */
- if (c->overridden_target_name != nullptr && strcmp(host, c->target_name) == 0) {
+ if (c->overridden_target_name != nullptr &&
+ strcmp(host, c->target_name) == 0) {
status = GRPC_SECURITY_OK;
}
if (status != GRPC_SECURITY_OK) {
diff --git a/src/core/lib/slice/slice_intern.cc b/src/core/lib/slice/slice_intern.cc
index 4ceb712904..e8949135c0 100644
--- a/src/core/lib/slice/slice_intern.cc
+++ b/src/core/lib/slice/slice_intern.cc
@@ -172,7 +172,7 @@ int grpc_static_slice_eq(grpc_slice a, grpc_slice b) {
uint32_t grpc_slice_hash(grpc_slice s) {
return s.refcount == nullptr ? grpc_slice_default_hash_impl(s)
- : s.refcount->vtable->hash(s);
+ : s.refcount->vtable->hash(s);
}
grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice,
diff --git a/src/core/lib/support/avl.cc b/src/core/lib/support/avl.cc
index ca0e4c6372..0b67a21f2f 100644
--- a/src/core/lib/support/avl.cc
+++ b/src/core/lib/support/avl.cc
@@ -60,8 +60,8 @@ static long node_height(gpr_avl_node* node) {
#ifndef NDEBUG
static long calculate_height(gpr_avl_node* node) {
return node == nullptr ? 0
- : 1 + GPR_MAX(calculate_height(node->left),
- calculate_height(node->right));
+ : 1 + GPR_MAX(calculate_height(node->left),
+ calculate_height(node->right));
}
static gpr_avl_node* assert_invariants(gpr_avl_node* n) {
diff --git a/src/core/lib/support/sync_posix.cc b/src/core/lib/support/sync_posix.cc
index d306d43cb4..dfdd233bf4 100644
--- a/src/core/lib/support/sync_posix.cc
+++ b/src/core/lib/support/sync_posix.cc
@@ -33,7 +33,9 @@ gpr_atm gpr_counter_atm_cas = 0;
gpr_atm gpr_counter_atm_add = 0;
#endif
-void gpr_mu_init(gpr_mu* mu) { GPR_ASSERT(pthread_mutex_init(mu, nullptr) == 0); }
+void gpr_mu_init(gpr_mu* mu) {
+ GPR_ASSERT(pthread_mutex_init(mu, nullptr) == 0);
+}
void gpr_mu_destroy(gpr_mu* mu) { GPR_ASSERT(pthread_mutex_destroy(mu) == 0); }
@@ -63,7 +65,9 @@ int gpr_mu_trylock(gpr_mu* mu) {
/*----------------------------------------*/
-void gpr_cv_init(gpr_cv* cv) { GPR_ASSERT(pthread_cond_init(cv, nullptr) == 0); }
+void gpr_cv_init(gpr_cv* cv) {
+ GPR_ASSERT(pthread_cond_init(cv, nullptr) == 0);
+}
void gpr_cv_destroy(gpr_cv* cv) { GPR_ASSERT(pthread_cond_destroy(cv) == 0); }
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index 92e36284bd..3a06b0c4cf 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -601,7 +601,8 @@ void grpc_call_unref(grpc_call* c) {
// effect of scheduling the previously set cancellation closure, if
// any, so that it can release any internal references it may be
// holding to the call stack.
- grpc_call_combiner_set_notify_on_cancel(&exec_ctx, &c->call_combiner, nullptr);
+ grpc_call_combiner_set_notify_on_cancel(&exec_ctx, &c->call_combiner,
+ nullptr);
}
GRPC_CALL_INTERNAL_UNREF(&exec_ctx, c, "destroy");
grpc_exec_ctx_finish(&exec_ctx);
@@ -1910,8 +1911,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx* exec_ctx,
if (!prepare_application_metadata(
exec_ctx, call,
(int)op->data.send_status_from_server.trailing_metadata_count,
- op->data.send_status_from_server.trailing_metadata, 1, 1, nullptr,
- 0)) {
+ op->data.send_status_from_server.trailing_metadata, 1, 1,
+ nullptr, 0)) {
for (int n = 0; n < call->send_extra_metadata_count; n++) {
GRPC_MDELEM_UNREF(exec_ctx, call->send_extra_metadata[n].md);
}
diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc
index 8987768a7e..1be734cdb7 100644
--- a/src/core/lib/surface/channel.cc
+++ b/src/core/lib/surface/channel.cc
@@ -306,8 +306,8 @@ grpc_call* grpc_channel_create_call(grpc_channel* channel,
grpc_mdelem_from_slices(&exec_ctx, GRPC_MDSTR_PATH,
grpc_slice_ref_internal(method)),
host != nullptr ? grpc_mdelem_from_slices(&exec_ctx, GRPC_MDSTR_AUTHORITY,
- grpc_slice_ref_internal(*host))
- : GRPC_MDNULL,
+ grpc_slice_ref_internal(*host))
+ : GRPC_MDNULL,
grpc_timespec_to_millis_round_up(deadline));
grpc_exec_ctx_finish(&exec_ctx);
return call;
@@ -323,8 +323,8 @@ grpc_call* grpc_channel_create_pollset_set_call(
grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_PATH,
grpc_slice_ref_internal(method)),
host != nullptr ? grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_AUTHORITY,
- grpc_slice_ref_internal(*host))
- : GRPC_MDNULL,
+ grpc_slice_ref_internal(*host))
+ : GRPC_MDNULL,
deadline);
}
@@ -372,8 +372,8 @@ grpc_call* grpc_channel_create_registered_call(
GPR_ASSERT(!reserved);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_call* call = grpc_channel_create_call_internal(
- &exec_ctx, channel, parent_call, propagation_mask, completion_queue, nullptr,
- GRPC_MDELEM_REF(rc->path), GRPC_MDELEM_REF(rc->authority),
+ &exec_ctx, channel, parent_call, propagation_mask, completion_queue,
+ nullptr, GRPC_MDELEM_REF(rc->path), GRPC_MDELEM_REF(rc->authority),
grpc_timespec_to_millis_round_up(deadline));
grpc_exec_ctx_finish(&exec_ctx);
return call;
diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc
index e90bbfccc2..a171f90666 100644
--- a/src/core/lib/surface/completion_queue.cc
+++ b/src/core/lib/surface/completion_queue.cc
@@ -148,7 +148,8 @@ static grpc_error* non_polling_poller_kick(
grpc_exec_ctx* exec_ctx, grpc_pollset* pollset,
grpc_pollset_worker* specific_worker) {
non_polling_poller* p = (non_polling_poller*)pollset;
- if (specific_worker == nullptr) specific_worker = (grpc_pollset_worker*)p->root;
+ if (specific_worker == nullptr)
+ specific_worker = (grpc_pollset_worker*)p->root;
if (specific_worker != nullptr) {
non_polling_worker* w = (non_polling_worker*)specific_worker;
if (!w->kicked) {
@@ -327,7 +328,8 @@ static void cq_destroy_pluck(void* data);
static const cq_vtable g_cq_vtable[] = {
/* GRPC_CQ_NEXT */
{GRPC_CQ_NEXT, sizeof(cq_next_data), cq_init_next, cq_shutdown_next,
- cq_destroy_next, cq_begin_op_for_next, cq_end_op_for_next, cq_next, nullptr},
+ cq_destroy_next, cq_begin_op_for_next, cq_end_op_for_next, cq_next,
+ nullptr},
/* GRPC_CQ_PLUCK */
{GRPC_CQ_PLUCK, sizeof(cq_pluck_data), cq_init_pluck, cq_shutdown_pluck,
cq_destroy_pluck, cq_begin_op_for_pluck, cq_end_op_for_pluck, nullptr,
diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc
index b9e2b58262..7114a9f545 100644
--- a/src/core/lib/surface/lame_client.cc
+++ b/src/core/lib/surface/lame_client.cc
@@ -167,8 +167,8 @@ grpc_channel* grpc_lame_client_channel_create(const char* target,
const char* error_message) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_channel_element* elem;
- grpc_channel* channel = grpc_channel_create(&exec_ctx, target, nullptr,
- GRPC_CLIENT_LAME_CHANNEL, nullptr);
+ grpc_channel* channel = grpc_channel_create(
+ &exec_ctx, target, nullptr, GRPC_CLIENT_LAME_CHANNEL, nullptr);
elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0);
GRPC_API_TRACE(
"grpc_lame_client_channel_create(target=%s, error_code=%d, "
diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc
index bb48c8d900..b816439770 100644
--- a/src/core/lib/surface/server.cc
+++ b/src/core/lib/surface/server.cc
@@ -1110,8 +1110,8 @@ void grpc_server_setup_transport(grpc_exec_ctx* exec_ctx, grpc_server* s,
uint32_t max_probes = 0;
grpc_transport_op* op = nullptr;
- channel =
- grpc_channel_create(exec_ctx, nullptr, args, GRPC_SERVER_CHANNEL, transport);
+ channel = grpc_channel_create(exec_ctx, nullptr, args, GRPC_SERVER_CHANNEL,
+ transport);
chand = (channel_data*)grpc_channel_stack_element(
grpc_channel_get_channel_stack(channel), 0)
->channel_data;
diff --git a/src/core/lib/transport/metadata_batch.cc b/src/core/lib/transport/metadata_batch.cc
index 480544c8a8..5817765aa3 100644
--- a/src/core/lib/transport/metadata_batch.cc
+++ b/src/core/lib/transport/metadata_batch.cc
@@ -270,7 +270,8 @@ void grpc_metadata_batch_clear(grpc_exec_ctx* exec_ctx,
}
bool grpc_metadata_batch_is_empty(grpc_metadata_batch* batch) {
- return batch->list.head == nullptr && batch->deadline == GRPC_MILLIS_INF_FUTURE;
+ return batch->list.head == nullptr &&
+ batch->deadline == GRPC_MILLIS_INF_FUTURE;
}
size_t grpc_metadata_batch_size(grpc_metadata_batch* batch) {
diff --git a/src/core/lib/transport/service_config.cc b/src/core/lib/transport/service_config.cc
index 6faf5c272a..adcec8c444 100644
--- a/src/core/lib/transport/service_config.cc
+++ b/src/core/lib/transport/service_config.cc
@@ -233,8 +233,8 @@ grpc_slice_hash_table* grpc_service_config_create_method_config_table(
// Instantiate method config table.
grpc_slice_hash_table* method_config_table = nullptr;
if (entries != nullptr) {
- method_config_table =
- grpc_slice_hash_table_create(num_entries, entries, unref_value, nullptr);
+ method_config_table = grpc_slice_hash_table_create(num_entries, entries,
+ unref_value, nullptr);
gpr_free(entries);
}
return method_config_table;
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc
index 9392c16db3..b39e6ebc30 100644
--- a/src/core/lib/transport/transport.cc
+++ b/src/core/lib/transport/transport.cc
@@ -186,7 +186,8 @@ void grpc_transport_set_pops(grpc_exec_ctx* exec_ctx, grpc_transport* transport,
grpc_pollset_set* pollset_set;
if ((pollset = grpc_polling_entity_pollset(pollent)) != nullptr) {
transport->vtable->set_pollset(exec_ctx, transport, stream, pollset);
- } else if ((pollset_set = grpc_polling_entity_pollset_set(pollent)) != nullptr) {
+ } else if ((pollset_set = grpc_polling_entity_pollset_set(pollent)) !=
+ nullptr) {
transport->vtable->set_pollset_set(exec_ctx, transport, stream,
pollset_set);
} else {
diff --git a/src/core/tsi/fake_transport_security.cc b/src/core/tsi/fake_transport_security.cc
index cce6ad29b5..e508d9b24a 100644
--- a/src/core/tsi/fake_transport_security.cc
+++ b/src/core/tsi/fake_transport_security.cc
@@ -402,7 +402,8 @@ static tsi_result fake_zero_copy_grpc_protector_protect(
grpc_exec_ctx* exec_ctx, tsi_zero_copy_grpc_protector* self,
grpc_slice_buffer* unprotected_slices,
grpc_slice_buffer* protected_slices) {
- if (self == nullptr || unprotected_slices == nullptr || protected_slices == nullptr) {
+ if (self == nullptr || unprotected_slices == nullptr ||
+ protected_slices == nullptr) {
return TSI_INVALID_ARGUMENT;
}
tsi_fake_zero_copy_grpc_protector* impl =
@@ -426,7 +427,8 @@ static tsi_result fake_zero_copy_grpc_protector_unprotect(
grpc_exec_ctx* exec_ctx, tsi_zero_copy_grpc_protector* self,
grpc_slice_buffer* protected_slices,
grpc_slice_buffer* unprotected_slices) {
- if (self == nullptr || unprotected_slices == nullptr || protected_slices == nullptr) {
+ if (self == nullptr || unprotected_slices == nullptr ||
+ protected_slices == nullptr) {
return TSI_INVALID_ARGUMENT;
}
tsi_fake_zero_copy_grpc_protector* impl =
diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc
index 2fe62f2f10..f1fff043bd 100644
--- a/src/core/tsi/ssl_transport_security.cc
+++ b/src/core/tsi/ssl_transport_security.cc
@@ -361,8 +361,8 @@ static tsi_result add_subject_alt_names_properties_to_peer(
static tsi_result peer_from_x509(X509* cert, int include_certificate_type,
tsi_peer* peer) {
/* TODO(jboeuf): Maybe add more properties. */
- GENERAL_NAMES* subject_alt_names =
- (GENERAL_NAMES*)X509_get_ext_d2i(cert, NID_subject_alt_name, nullptr, nullptr);
+ GENERAL_NAMES* subject_alt_names = (GENERAL_NAMES*)X509_get_ext_d2i(
+ cert, NID_subject_alt_name, nullptr, nullptr);
int subject_alt_name_count = (subject_alt_names != nullptr)
? (int)sk_GENERAL_NAME_num(subject_alt_names)
: 0;
@@ -631,7 +631,8 @@ static tsi_result populate_ssl_context(
}
}
}
- if ((cipher_list != nullptr) && !SSL_CTX_set_cipher_list(context, cipher_list)) {
+ if ((cipher_list != nullptr) &&
+ !SSL_CTX_set_cipher_list(context, cipher_list)) {
gpr_log(GPR_ERROR, "Invalid cipher list: %s.", cipher_list);
return TSI_INVALID_ARGUMENT;
}
@@ -679,7 +680,8 @@ static tsi_result build_alpn_protocol_name_list(
*protocol_name_list_length = 0;
if (num_alpn_protocols == 0) return TSI_INVALID_ARGUMENT;
for (i = 0; i < num_alpn_protocols; i++) {
- size_t length = alpn_protocols[i] == nullptr ? 0 : strlen(alpn_protocols[i]);
+ size_t length =
+ alpn_protocols[i] == nullptr ? 0 : strlen(alpn_protocols[i]);
if (length == 0 || length > 255) {
gpr_log(GPR_ERROR, "Invalid protocol name length: %d.", (int)length);
return TSI_INVALID_ARGUMENT;
@@ -1218,8 +1220,8 @@ tsi_result tsi_ssl_server_handshaker_factory_create_handshaker(
if (self->ssl_context_count == 0) return TSI_INVALID_ARGUMENT;
/* Create the handshaker with the first context. We will switch if needed
because of SNI in ssl_server_handshaker_factory_servername_callback. */
- return create_tsi_ssl_handshaker(self->ssl_contexts[0], 0, nullptr, &self->base,
- handshaker);
+ return create_tsi_ssl_handshaker(self->ssl_contexts[0], 0, nullptr,
+ &self->base, handshaker);
}
void tsi_ssl_server_handshaker_factory_unref(
diff --git a/src/core/tsi/transport_security.cc b/src/core/tsi/transport_security.cc
index 9f66492536..a2232bfab1 100644
--- a/src/core/tsi/transport_security.cc
+++ b/src/core/tsi/transport_security.cc
@@ -74,8 +74,9 @@ tsi_result tsi_frame_protector_protect(tsi_frame_protector* self,
size_t* unprotected_bytes_size,
unsigned char* protected_output_frames,
size_t* protected_output_frames_size) {
- if (self == nullptr || self->vtable == nullptr || unprotected_bytes == nullptr ||
- unprotected_bytes_size == nullptr || protected_output_frames == nullptr ||
+ if (self == nullptr || self->vtable == nullptr ||
+ unprotected_bytes == nullptr || unprotected_bytes_size == nullptr ||
+ protected_output_frames == nullptr ||
protected_output_frames_size == nullptr) {
return TSI_INVALID_ARGUMENT;
}
@@ -88,8 +89,10 @@ tsi_result tsi_frame_protector_protect(tsi_frame_protector* self,
tsi_result tsi_frame_protector_protect_flush(
tsi_frame_protector* self, unsigned char* protected_output_frames,
size_t* protected_output_frames_size, size_t* still_pending_size) {
- if (self == nullptr || self->vtable == nullptr || protected_output_frames == nullptr ||
- protected_output_frames_size == nullptr || still_pending_size == nullptr) {
+ if (self == nullptr || self->vtable == nullptr ||
+ protected_output_frames == nullptr ||
+ protected_output_frames_size == nullptr ||
+ still_pending_size == nullptr) {
return TSI_INVALID_ARGUMENT;
}
if (self->vtable->protect_flush == nullptr) return TSI_UNIMPLEMENTED;
@@ -102,7 +105,8 @@ tsi_result tsi_frame_protector_unprotect(
tsi_frame_protector* self, const unsigned char* protected_frames_bytes,
size_t* protected_frames_bytes_size, unsigned char* unprotected_bytes,
size_t* unprotected_bytes_size) {
- if (self == nullptr || self->vtable == nullptr || protected_frames_bytes == nullptr ||
+ if (self == nullptr || self->vtable == nullptr ||
+ protected_frames_bytes == nullptr ||
protected_frames_bytes_size == nullptr || unprotected_bytes == nullptr ||
unprotected_bytes_size == nullptr) {
return TSI_INVALID_ARGUMENT;
@@ -130,7 +134,8 @@ tsi_result tsi_handshaker_get_bytes_to_send_to_peer(tsi_handshaker* self,
return TSI_INVALID_ARGUMENT;
}
if (self->frame_protector_created) return TSI_FAILED_PRECONDITION;
- if (self->vtable->get_bytes_to_send_to_peer == nullptr) return TSI_UNIMPLEMENTED;
+ if (self->vtable->get_bytes_to_send_to_peer == nullptr)
+ return TSI_UNIMPLEMENTED;
return self->vtable->get_bytes_to_send_to_peer(self, bytes, bytes_size);
}
@@ -142,7 +147,8 @@ tsi_result tsi_handshaker_process_bytes_from_peer(tsi_handshaker* self,
return TSI_INVALID_ARGUMENT;
}
if (self->frame_protector_created) return TSI_FAILED_PRECONDITION;
- if (self->vtable->process_bytes_from_peer == nullptr) return TSI_UNIMPLEMENTED;
+ if (self->vtable->process_bytes_from_peer == nullptr)
+ return TSI_UNIMPLEMENTED;
return self->vtable->process_bytes_from_peer(self, bytes, bytes_size);
}
diff --git a/src/core/tsi/transport_security_adapter.cc b/src/core/tsi/transport_security_adapter.cc
index 137bf6bfdd..56dec55494 100644
--- a/src/core/tsi/transport_security_adapter.cc
+++ b/src/core/tsi/transport_security_adapter.cc
@@ -77,7 +77,8 @@ static const tsi_handshaker_result_vtable result_vtable = {
static tsi_result tsi_adapter_create_handshaker_result(
tsi_handshaker* wrapped, const unsigned char* unused_bytes,
size_t unused_bytes_size, tsi_handshaker_result** handshaker_result) {
- if (wrapped == nullptr || (unused_bytes_size > 0 && unused_bytes == nullptr)) {
+ if (wrapped == nullptr ||
+ (unused_bytes_size > 0 && unused_bytes == nullptr)) {
return TSI_INVALID_ARGUMENT;
}
tsi_adapter_handshaker_result* impl =
diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc
index a445feab66..93233153d0 100644
--- a/src/cpp/client/create_channel.cc
+++ b/src/cpp/client/create_channel.cc
@@ -39,11 +39,11 @@ std::shared_ptr<Channel> CreateCustomChannel(
const std::shared_ptr<ChannelCredentials>& creds,
const ChannelArguments& args) {
GrpcLibraryCodegen init_lib; // We need to call init in case of a bad creds.
- return creds
- ? creds->CreateChannel(target, args)
- : CreateChannelInternal("", grpc_lame_client_channel_create(
- nullptr, GRPC_STATUS_INVALID_ARGUMENT,
- "Invalid credentials."));
+ return creds ? creds->CreateChannel(target, args)
+ : CreateChannelInternal(
+ "", grpc_lame_client_channel_create(
+ nullptr, GRPC_STATUS_INVALID_ARGUMENT,
+ "Invalid credentials."));
}
} // namespace grpc
diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc
index c8bd005d5c..c19b7bdf40 100644
--- a/test/core/bad_client/bad_client.cc
+++ b/test/core/bad_client/bad_client.cc
@@ -175,9 +175,10 @@ void grpc_run_bad_client_test(
grpc_exec_ctx_finish(&exec_ctx);
do {
GPR_ASSERT(gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0);
- GPR_ASSERT(grpc_completion_queue_next(
- a.cq, grpc_timeout_milliseconds_to_deadline(100), nullptr)
- .type == GRPC_QUEUE_TIMEOUT);
+ GPR_ASSERT(
+ grpc_completion_queue_next(
+ a.cq, grpc_timeout_milliseconds_to_deadline(100), nullptr)
+ .type == GRPC_QUEUE_TIMEOUT);
} while (!gpr_event_get(&read_done_event));
if (client_validator(&incoming)) break;
gpr_log(GPR_INFO,
@@ -198,8 +199,9 @@ void grpc_run_bad_client_test(
gpr_event_wait(&a.done_write, grpc_timeout_seconds_to_deadline(1)));
shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr);
grpc_server_shutdown_and_notify(a.server, shutdown_cq, nullptr);
- GPR_ASSERT(grpc_completion_queue_pluck(
- shutdown_cq, nullptr, grpc_timeout_seconds_to_deadline(1), nullptr)
+ GPR_ASSERT(grpc_completion_queue_pluck(shutdown_cq, nullptr,
+ grpc_timeout_seconds_to_deadline(1),
+ nullptr)
.type == GRPC_OP_COMPLETE);
grpc_completion_queue_destroy(shutdown_cq);
grpc_server_destroy(a.server);
diff --git a/test/core/bad_client/tests/connection_prefix.cc b/test/core/bad_client/tests/connection_prefix.cc
index 8ffc5a5be8..47252f9f10 100644
--- a/test/core/bad_client/tests/connection_prefix.cc
+++ b/test/core/bad_client/tests/connection_prefix.cc
@@ -53,7 +53,8 @@ int main(int argc, char** argv) {
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, "PRI * HTTP/2.0\r\n\r\nSX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, "PRI * HTTP/2.0\r\n\r\nSMX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, "PRI * HTTP/2.0\r\n\r\nSM\rX", 0);
- GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, "PRI * HTTP/2.0\r\n\r\nSM\r\nX", 0);
+ GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, "PRI * HTTP/2.0\r\n\r\nSM\r\nX",
+ 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, "PRI * HTTP/2.0\r\n\r\nSM\r\n\rX",
0);
return 0;
diff --git a/test/core/bad_client/tests/headers.cc b/test/core/bad_client/tests/headers.cc
index e0b77e043a..50bb72c493 100644
--- a/test/core/bad_client/tests/headers.cc
+++ b/test/core/bad_client/tests/headers.cc
@@ -50,7 +50,8 @@ int main(int argc, char** argv) {
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, PFX_STR "\x00\x00\x00\x01\x05",
GRPC_BAD_CLIENT_DISCONNECT);
- GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, PFX_STR "\x00\x00\x00\x01\x04\x00",
+ GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr,
+ PFX_STR "\x00\x00\x00\x01\x04\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr,
PFX_STR "\x00\x00\x00\x01\x04\x00\x00",
diff --git a/test/core/bad_client/tests/initial_settings_frame.cc b/test/core/bad_client/tests/initial_settings_frame.cc
index 4a01c9ee3e..edc52f503e 100644
--- a/test/core/bad_client/tests/initial_settings_frame.cc
+++ b/test/core/bad_client/tests/initial_settings_frame.cc
@@ -55,7 +55,8 @@ int main(int argc, char** argv) {
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, PFX_STR "\x00\x00\x00\x04\xff",
GRPC_BAD_CLIENT_DISCONNECT);
- GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr, PFX_STR "\x00\x00\x00\x04\x00\x00",
+ GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr,
+ PFX_STR "\x00\x00\x00\x04\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, nullptr,
PFX_STR "\x00\x00\x00\x04\x00\x00\x00",
diff --git a/test/core/bad_ssl/server_common.cc b/test/core/bad_ssl/server_common.cc
index 068d707306..08842b8350 100644
--- a/test/core/bad_ssl/server_common.cc
+++ b/test/core/bad_ssl/server_common.cc
@@ -71,10 +71,10 @@ void bad_ssl_run(grpc_server* server) {
gpr_log(GPR_INFO, "Shutting down due to SIGINT");
shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr);
grpc_server_shutdown_and_notify(server, shutdown_cq, nullptr);
- GPR_ASSERT(
- grpc_completion_queue_pluck(shutdown_cq, nullptr,
- grpc_timeout_seconds_to_deadline(5), nullptr)
- .type == GRPC_OP_COMPLETE);
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ shutdown_cq, nullptr, grpc_timeout_seconds_to_deadline(5),
+ nullptr)
+ .type == GRPC_OP_COMPLETE);
grpc_completion_queue_destroy(shutdown_cq);
grpc_completion_queue_shutdown(cq);
shutdown_started = 1;
diff --git a/test/core/bad_ssl/servers/alpn.cc b/test/core/bad_ssl/servers/alpn.cc
index 591f0f2eef..23954d82fd 100644
--- a/test/core/bad_ssl/servers/alpn.cc
+++ b/test/core/bad_ssl/servers/alpn.cc
@@ -58,8 +58,8 @@ int main(int argc, char** argv) {
grpc_server* server;
grpc_init();
- ssl_creds =
- grpc_ssl_server_credentials_create(nullptr, &pem_key_cert_pair, 1, 0, nullptr);
+ ssl_creds = grpc_ssl_server_credentials_create(nullptr, &pem_key_cert_pair, 1,
+ 0, nullptr);
server = grpc_server_create(nullptr, nullptr);
GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds));
grpc_server_credentials_release(ssl_creds);
diff --git a/test/core/bad_ssl/servers/cert.cc b/test/core/bad_ssl/servers/cert.cc
index 49895d902d..a51dd34e4b 100644
--- a/test/core/bad_ssl/servers/cert.cc
+++ b/test/core/bad_ssl/servers/cert.cc
@@ -49,8 +49,8 @@ int main(int argc, char** argv) {
pem_key_cert_pair.private_key = (const char*)GRPC_SLICE_START_PTR(key_slice);
pem_key_cert_pair.cert_chain = (const char*)GRPC_SLICE_START_PTR(cert_slice);
- ssl_creds =
- grpc_ssl_server_credentials_create(nullptr, &pem_key_cert_pair, 1, 0, nullptr);
+ ssl_creds = grpc_ssl_server_credentials_create(nullptr, &pem_key_cert_pair, 1,
+ 0, nullptr);
server = grpc_server_create(nullptr, nullptr);
GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds));
grpc_server_credentials_release(ssl_creds);
diff --git a/test/core/channel/minimal_stack_is_minimal_test.cc b/test/core/channel/minimal_stack_is_minimal_test.cc
index f6d7339ea1..e0cffa39a8 100644
--- a/test/core/channel/minimal_stack_is_minimal_test.cc
+++ b/test/core/channel/minimal_stack_is_minimal_test.cc
@@ -85,20 +85,21 @@ int main(int argc, char** argv) {
// tests with a default stack
errors += CHECK_STACK("unknown", nullptr, GRPC_CLIENT_DIRECT_CHANNEL,
"message_size", "deadline", "connected", NULL);
- errors += CHECK_STACK("unknown", nullptr, GRPC_CLIENT_SUBCHANNEL, "message_size",
- "connected", NULL);
+ errors += CHECK_STACK("unknown", nullptr, GRPC_CLIENT_SUBCHANNEL,
+ "message_size", "connected", NULL);
errors += CHECK_STACK("unknown", nullptr, GRPC_SERVER_CHANNEL, "server",
"message_size", "deadline", "connected", NULL);
errors += CHECK_STACK("chttp2", nullptr, GRPC_CLIENT_DIRECT_CHANNEL,
"message_size", "deadline", "http-client",
"message_compress", "connected", NULL);
- errors += CHECK_STACK("chttp2", nullptr, GRPC_CLIENT_SUBCHANNEL, "message_size",
- "http-client", "message_compress", "connected", NULL);
+ errors +=
+ CHECK_STACK("chttp2", nullptr, GRPC_CLIENT_SUBCHANNEL, "message_size",
+ "http-client", "message_compress", "connected", NULL);
errors += CHECK_STACK("chttp2", nullptr, GRPC_SERVER_CHANNEL, "server",
"message_size", "deadline", "http-server",
"message_compress", "connected", NULL);
- errors +=
- CHECK_STACK(nullptr, nullptr, GRPC_CLIENT_CHANNEL, "client-channel", NULL);
+ errors += CHECK_STACK(nullptr, nullptr, GRPC_CLIENT_CHANNEL, "client-channel",
+ NULL);
GPR_ASSERT(errors == 0);
grpc_shutdown();
diff --git a/test/core/client_channel/lb_policies_test.cc b/test/core/client_channel/lb_policies_test.cc
index 486ad2c212..5f8d3b84cc 100644
--- a/test/core/client_channel/lb_policies_test.cc
+++ b/test/core/client_channel/lb_policies_test.cc
@@ -286,9 +286,10 @@ static request_sequences perform_request(servers_fixture* f,
memset(s_valid, 0, f->num_servers * sizeof(int));
grpc_slice host = grpc_slice_from_static_string("foo.test.google.fr");
- c = grpc_channel_create_call(client, nullptr, GRPC_PROPAGATE_DEFAULTS, f->cq,
- grpc_slice_from_static_string("/foo"), &host,
- gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
+ c = grpc_channel_create_call(client, nullptr, GRPC_PROPAGATE_DEFAULTS,
+ f->cq, grpc_slice_from_static_string("/foo"),
+ &host, gpr_inf_future(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(c);
completed_client = 0;
@@ -317,14 +318,14 @@ static request_sequences perform_request(servers_fixture* f,
op->flags = 0;
op->reserved = nullptr;
op++;
- GPR_ASSERT(GRPC_CALL_OK ==
- grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr));
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, (size_t)(op - ops),
+ tag(1), nullptr));
s_idx = -1;
- while (
- (ev = grpc_completion_queue_next(
- f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT), nullptr))
- .type != GRPC_QUEUE_TIMEOUT) {
+ while ((ev = grpc_completion_queue_next(
+ f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT),
+ nullptr))
+ .type != GRPC_QUEUE_TIMEOUT) {
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
read_tag = ((int)(intptr_t)ev.tag);
const grpc_connectivity_state conn_state =
@@ -401,10 +402,10 @@ static request_sequences perform_request(servers_fixture* f,
}
}
- GPR_ASSERT(
- grpc_completion_queue_next(
- f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT), nullptr)
- .type == GRPC_QUEUE_TIMEOUT);
+ GPR_ASSERT(grpc_completion_queue_next(
+ f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT),
+ nullptr)
+ .type == GRPC_QUEUE_TIMEOUT);
grpc_metadata_array_destroy(&rdata->initial_metadata_recv);
grpc_metadata_array_destroy(&rdata->trailing_metadata_recv);
@@ -451,10 +452,10 @@ static grpc_call** perform_multirequest(servers_fixture* f,
grpc_slice host = grpc_slice_from_static_string("foo.test.google.fr");
for (i = 0; i < concurrent_calls; i++) {
- calls[i] =
- grpc_channel_create_call(client, nullptr, GRPC_PROPAGATE_DEFAULTS, f->cq,
- grpc_slice_from_static_string("/foo"), &host,
- gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
+ calls[i] = grpc_channel_create_call(
+ client, nullptr, GRPC_PROPAGATE_DEFAULTS, f->cq,
+ grpc_slice_from_static_string("/foo"), &host,
+ gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
GPR_ASSERT(calls[i]);
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(calls[i], ops,
(size_t)(op - ops), tag(1),
@@ -602,9 +603,8 @@ static void test_pending_calls(size_t concurrent_calls) {
client = create_client(f);
calls = perform_multirequest(f, client, concurrent_calls);
- grpc_call_cancel(
- calls[0],
- nullptr); /* exercise the cancel pick path whilst there are pending picks */
+ grpc_call_cancel(calls[0], nullptr); /* exercise the cancel pick path whilst
+ there are pending picks */
gpr_free(rdata.call_details);
diff --git a/test/core/client_channel/parse_address_test.cc b/test/core/client_channel/parse_address_test.cc
index 938cef309e..94f76da920 100644
--- a/test/core/client_channel/parse_address_test.cc
+++ b/test/core/client_channel/parse_address_test.cc
@@ -63,7 +63,7 @@ static void test_grpc_parse_ipv4(const char* uri_text, const char* host,
struct sockaddr_in* addr_in = (struct sockaddr_in*)addr.addr;
GPR_ASSERT(AF_INET == addr_in->sin_family);
GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET, &addr_in->sin_addr, ntop_buf,
- sizeof(ntop_buf)));
+ sizeof(ntop_buf)));
GPR_ASSERT(0 == strcmp(ntop_buf, host));
GPR_ASSERT(ntohs(addr_in->sin_port) == port);
@@ -82,7 +82,7 @@ static void test_grpc_parse_ipv6(const char* uri_text, const char* host,
struct sockaddr_in6* addr_in6 = (struct sockaddr_in6*)addr.addr;
GPR_ASSERT(AF_INET6 == addr_in6->sin6_family);
GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET6, &addr_in6->sin6_addr, ntop_buf,
- sizeof(ntop_buf)));
+ sizeof(ntop_buf)));
GPR_ASSERT(0 == strcmp(ntop_buf, host));
GPR_ASSERT(ntohs(addr_in6->sin6_port) == port);
GPR_ASSERT(addr_in6->sin6_scope_id == scope_id);
diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
index f377abc269..dcf315eba5 100644
--- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
@@ -73,7 +73,8 @@ static grpc_ares_request* my_dns_lookup_ares(
} else {
gpr_mu_unlock(&g_mu);
*lb_addrs = grpc_lb_addresses_create(1, nullptr);
- grpc_lb_addresses_set_address(*lb_addrs, 0, nullptr, 0, false, nullptr, nullptr);
+ grpc_lb_addresses_set_address(*lb_addrs, 0, nullptr, 0, false, nullptr,
+ nullptr);
}
GRPC_CLOSURE_SCHED(exec_ctx, on_done, error);
return nullptr;
diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc
index 04275e2c2a..b0c6ae926e 100644
--- a/test/core/end2end/bad_server_response_test.cc
+++ b/test/core/end2end/bad_server_response_test.cc
@@ -197,8 +197,8 @@ static void start_rpc(int target_port, grpc_status_code expected_status,
op->flags = 0;
op->reserved = nullptr;
op++;
- error =
- grpc_call_start_batch(state.call, ops, (size_t)(op - ops), tag(1), nullptr);
+ error = grpc_call_start_batch(state.call, ops, (size_t)(op - ops), tag(1),
+ nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc
index 7fc36706f8..f3f2dda91d 100644
--- a/test/core/end2end/connection_refused_test.cc
+++ b/test/core/end2end/connection_refused_test.cc
@@ -83,9 +83,10 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
chan = grpc_insecure_channel_create(addr, args, nullptr);
grpc_slice host = grpc_slice_from_static_string("nonexistant");
gpr_timespec deadline = grpc_timeout_seconds_to_deadline(2);
- call = grpc_channel_create_call(
- chan, nullptr, GRPC_PROPAGATE_DEFAULTS, cq,
- grpc_slice_from_static_string("/service/method"), &host, deadline, nullptr);
+ call =
+ grpc_channel_create_call(chan, nullptr, GRPC_PROPAGATE_DEFAULTS, cq,
+ grpc_slice_from_static_string("/service/method"),
+ &host, deadline, nullptr);
gpr_free(addr);
@@ -105,8 +106,9 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
op->flags = 0;
op->reserved = nullptr;
op++;
- GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(
- call, ops, (size_t)(op - ops), tag(1), nullptr));
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(call, ops,
+ (size_t)(op - ops), tag(1),
+ nullptr));
/* verify that all tags get completed */
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
@@ -118,9 +120,9 @@ static void run_test(bool wait_for_ready, bool use_service_config) {
}
grpc_completion_queue_shutdown(cq);
- while (
- grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr)
- .type != GRPC_QUEUE_SHUTDOWN)
+ while (grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME),
+ nullptr)
+ .type != GRPC_QUEUE_SHUTDOWN)
;
grpc_completion_queue_destroy(cq);
grpc_call_unref(call);
diff --git a/test/core/end2end/cq_verifier.cc b/test/core/end2end/cq_verifier.cc
index d595124c00..8686f4e7b7 100644
--- a/test/core/end2end/cq_verifier.cc
+++ b/test/core/end2end/cq_verifier.cc
@@ -290,7 +290,8 @@ void cq_verify_empty_timeout(cq_verifier* v, int timeout_sec) {
gpr_time_from_seconds(timeout_sec, GPR_TIMESPAN));
grpc_event ev;
- GPR_ASSERT(v->first_expectation == nullptr && "expectation queue must be empty");
+ GPR_ASSERT(v->first_expectation == nullptr &&
+ "expectation queue must be empty");
ev = grpc_completion_queue_next(v->cq, deadline, nullptr);
if (ev.type != GRPC_QUEUE_TIMEOUT) {
diff --git a/test/core/end2end/dualstack_socket_test.cc b/test/core/end2end/dualstack_socket_test.cc
index 2c7a6cfbbc..ad2b24fdb0 100644
--- a/test/core/end2end/dualstack_socket_test.cc
+++ b/test/core/end2end/dualstack_socket_test.cc
@@ -211,7 +211,8 @@ void test_connect(const char* server_host, const char* client_host, int port,
op->data.recv_close_on_server.cancelled = &was_cancelled;
op->flags = 0;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
diff --git a/test/core/end2end/fixtures/h2_census.cc b/test/core/end2end/fixtures/h2_census.cc
index 89d992cf52..fed8ead5c8 100644
--- a/test/core/end2end/fixtures/h2_census.cc
+++ b/test/core/end2end/fixtures/h2_census.cc
@@ -71,7 +71,8 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
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, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr);
GPR_ASSERT(f->client);
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
diff --git a/test/core/end2end/fixtures/h2_compress.cc b/test/core/end2end/fixtures/h2_compress.cc
index fbf4d2061b..ea8990fd0a 100644
--- a/test/core/end2end/fixtures/h2_compress.cc
+++ b/test/core/end2end/fixtures/h2_compress.cc
@@ -72,8 +72,8 @@ void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture* f,
}
ffd->client_args_compression = grpc_channel_args_set_compression_algorithm(
client_args, GRPC_COMPRESS_GZIP);
- f->client = grpc_insecure_channel_create(ffd->localaddr,
- ffd->client_args_compression, nullptr);
+ f->client = grpc_insecure_channel_create(
+ ffd->localaddr, ffd->client_args_compression, nullptr);
}
void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture* f,
diff --git a/test/core/end2end/fixtures/h2_fakesec.cc b/test/core/end2end/fixtures/h2_fakesec.cc
index 570d040976..87d4668d50 100644
--- a/test/core/end2end/fixtures/h2_fakesec.cc
+++ b/test/core/end2end/fixtures/h2_fakesec.cc
@@ -118,7 +118,8 @@ static void chttp2_init_server_fake_secure_fullstack(
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, nullptr, nullptr};
+ grpc_auth_metadata_processor processor = {process_auth_failure, nullptr,
+ nullptr};
grpc_server_credentials_set_auth_metadata_processor(fake_ts_creds,
processor);
}
diff --git a/test/core/end2end/fixtures/h2_full+pipe.cc b/test/core/end2end/fixtures/h2_full+pipe.cc
index 306c85871b..b080591e85 100644
--- a/test/core/end2end/fixtures/h2_full+pipe.cc
+++ b/test/core/end2end/fixtures/h2_full+pipe.cc
@@ -66,7 +66,8 @@ 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, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr);
GPR_ASSERT(f->client);
}
diff --git a/test/core/end2end/fixtures/h2_full+trace.cc b/test/core/end2end/fixtures/h2_full+trace.cc
index 589bf1d7e4..a49de96009 100644
--- a/test/core/end2end/fixtures/h2_full+trace.cc
+++ b/test/core/end2end/fixtures/h2_full+trace.cc
@@ -66,7 +66,8 @@ 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, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr);
GPR_ASSERT(f->client);
}
diff --git a/test/core/end2end/fixtures/h2_full+workarounds.cc b/test/core/end2end/fixtures/h2_full+workarounds.cc
index ffe2623c44..71a497d796 100644
--- a/test/core/end2end/fixtures/h2_full+workarounds.cc
+++ b/test/core/end2end/fixtures/h2_full+workarounds.cc
@@ -64,7 +64,8 @@ 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, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr);
GPR_ASSERT(f->client);
}
diff --git a/test/core/end2end/fixtures/h2_full.cc b/test/core/end2end/fixtures/h2_full.cc
index c0a9524cc6..6d15c28662 100644
--- a/test/core/end2end/fixtures/h2_full.cc
+++ b/test/core/end2end/fixtures/h2_full.cc
@@ -60,7 +60,8 @@ 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, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr);
GPR_ASSERT(f->client);
}
diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc
index 45f6cb56ac..099367d91b 100644
--- a/test/core/end2end/fixtures/h2_http_proxy.cc
+++ b/test/core/end2end/fixtures/h2_http_proxy.cc
@@ -81,7 +81,8 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
}
gpr_setenv("http_proxy", proxy_uri);
gpr_free(proxy_uri);
- f->client = grpc_insecure_channel_create(ffd->server_addr, client_args, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->server_addr, client_args, nullptr);
GPR_ASSERT(f->client);
}
diff --git a/test/core/end2end/fixtures/h2_load_reporting.cc b/test/core/end2end/fixtures/h2_load_reporting.cc
index c0aa8ebdce..7486b6af78 100644
--- a/test/core/end2end/fixtures/h2_load_reporting.cc
+++ b/test/core/end2end/fixtures/h2_load_reporting.cc
@@ -62,7 +62,8 @@ 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, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr);
GPR_ASSERT(f->client);
}
diff --git a/test/core/end2end/fixtures/h2_oauth2.cc b/test/core/end2end/fixtures/h2_oauth2.cc
index 474a1b4b9e..1642cb0db9 100644
--- a/test/core/end2end/fixtures/h2_oauth2.cc
+++ b/test/core/end2end/fixtures/h2_oauth2.cc
@@ -149,7 +149,8 @@ static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack(
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_composite_channel_credentials_create(ssl_creds, oauth2_creds, nullptr);
+ grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds,
+ nullptr);
grpc_arg ssl_name_override = {
GRPC_ARG_STRING,
const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
@@ -200,8 +201,8 @@ static void chttp2_init_server_simple_ssl_secure_fullstack(
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_ssl_server_credentials_create(nullptr, &pem_key_cert_pair, 1, 0, nullptr);
+ grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create(
+ nullptr, &pem_key_cert_pair, 1, 0, nullptr);
grpc_server_credentials_set_auth_metadata_processor(
ssl_creds, test_processor_create(fail_server_auth_check(server_args)));
chttp2_init_server_secure_fullstack(f, server_args, ssl_creds);
diff --git a/test/core/end2end/fixtures/h2_ssl.cc b/test/core/end2end/fixtures/h2_ssl.cc
index 047b5d7510..3d7e2e327e 100644
--- a/test/core/end2end/fixtures/h2_ssl.cc
+++ b/test/core/end2end/fixtures/h2_ssl.cc
@@ -132,10 +132,11 @@ static void chttp2_init_server_simple_ssl_secure_fullstack(
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_ssl_server_credentials_create(nullptr, &pem_cert_key_pair, 1, 0, nullptr);
+ grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create(
+ nullptr, &pem_cert_key_pair, 1, 0, nullptr);
if (fail_server_auth_check(server_args)) {
- grpc_auth_metadata_processor processor = {process_auth_failure, nullptr, nullptr};
+ grpc_auth_metadata_processor processor = {process_auth_failure, nullptr,
+ nullptr};
grpc_server_credentials_set_auth_metadata_processor(ssl_creds, processor);
}
chttp2_init_server_secure_fullstack(f, server_args, ssl_creds);
diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.cc b/test/core/end2end/fixtures/h2_ssl_proxy.cc
index 7191210261..f8d5a699e4 100644
--- a/test/core/end2end/fixtures/h2_ssl_proxy.cc
+++ b/test/core/end2end/fixtures/h2_ssl_proxy.cc
@@ -44,8 +44,8 @@ static grpc_server* create_proxy_server(const char* port,
grpc_server* s = grpc_server_create(server_args, nullptr);
grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key,
test_server1_cert};
- grpc_server_credentials* ssl_creds =
- grpc_ssl_server_credentials_create(nullptr, &pem_cert_key_pair, 1, 0, nullptr);
+ grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create(
+ nullptr, &pem_cert_key_pair, 1, 0, nullptr);
GPR_ASSERT(grpc_server_add_secure_http2_port(s, port, ssl_creds));
grpc_server_credentials_release(ssl_creds);
return s;
@@ -170,10 +170,11 @@ static void chttp2_init_server_simple_ssl_secure_fullstack(
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_ssl_server_credentials_create(nullptr, &pem_cert_key_pair, 1, 0, nullptr);
+ grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create(
+ nullptr, &pem_cert_key_pair, 1, 0, nullptr);
if (fail_server_auth_check(server_args)) {
- grpc_auth_metadata_processor processor = {process_auth_failure, nullptr, nullptr};
+ grpc_auth_metadata_processor processor = {process_auth_failure, nullptr,
+ nullptr};
grpc_server_credentials_set_auth_metadata_processor(ssl_creds, processor);
}
chttp2_init_server_secure_fullstack(f, server_args, ssl_creds);
diff --git a/test/core/end2end/fixtures/h2_uds.cc b/test/core/end2end/fixtures/h2_uds.cc
index 553244f800..28f0a50e15 100644
--- a/test/core/end2end/fixtures/h2_uds.cc
+++ b/test/core/end2end/fixtures/h2_uds.cc
@@ -66,7 +66,8 @@ 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, nullptr);
+ f->client =
+ grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr);
}
void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f,
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc
index ab4197e95c..0bdd15c57d 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.cc
+++ b/test/core/end2end/fixtures/http_proxy_fixture.cc
@@ -348,8 +348,8 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg,
// Read request and feed it to the parser.
for (size_t i = 0; i < conn->client_read_buffer.count; ++i) {
if (GRPC_SLICE_LENGTH(conn->client_read_buffer.slices[i]) > 0) {
- error = grpc_http_parser_parse(&conn->http_parser,
- conn->client_read_buffer.slices[i], nullptr);
+ error = grpc_http_parser_parse(
+ &conn->http_parser, conn->client_read_buffer.slices[i], nullptr);
if (error != GRPC_ERROR_NONE) {
proxy_connection_failed(exec_ctx, conn, true /* is_client */,
"HTTP proxy request parse", error);
diff --git a/test/core/end2end/fixtures/proxy.cc b/test/core/end2end/fixtures/proxy.cc
index 3d3eed495c..2fab62b721 100644
--- a/test/core/end2end/fixtures/proxy.cc
+++ b/test/core/end2end/fixtures/proxy.cc
@@ -163,8 +163,9 @@ static void on_p2s_recv_initial_metadata(void* arg, int success) {
op.data.send_initial_metadata.count = pc->p2s_initial_metadata.count;
op.data.send_initial_metadata.metadata = pc->p2s_initial_metadata.metadata;
refpc(pc, "on_c2p_sent_initial_metadata");
- err = grpc_call_start_batch(
- pc->c2p, &op, 1, new_closure(on_c2p_sent_initial_metadata, pc), nullptr);
+ err = grpc_call_start_batch(pc->c2p, &op, 1,
+ new_closure(on_c2p_sent_initial_metadata, pc),
+ nullptr);
GPR_ASSERT(err == GRPC_CALL_OK);
}
@@ -215,8 +216,8 @@ static void on_c2p_recv_msg(void* arg, int success) {
op.reserved = nullptr;
op.data.send_message.send_message = pc->c2p_msg;
refpc(pc, "on_p2s_sent_message");
- err = grpc_call_start_batch(pc->p2s, &op, 1,
- new_closure(on_p2s_sent_message, pc), nullptr);
+ err = grpc_call_start_batch(
+ pc->p2s, &op, 1, new_closure(on_p2s_sent_message, pc), nullptr);
GPR_ASSERT(err == GRPC_CALL_OK);
} else {
op.op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
@@ -339,8 +340,9 @@ static void on_new_call(void* arg, int success) {
op.data.recv_initial_metadata.recv_initial_metadata =
&pc->p2s_initial_metadata;
refpc(pc, "on_p2s_recv_initial_metadata");
- err = grpc_call_start_batch(
- pc->p2s, &op, 1, new_closure(on_p2s_recv_initial_metadata, pc), nullptr);
+ err = grpc_call_start_batch(pc->p2s, &op, 1,
+ new_closure(on_p2s_recv_initial_metadata, pc),
+ nullptr);
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_SEND_INITIAL_METADATA;
@@ -348,8 +350,9 @@ static void on_new_call(void* arg, int success) {
op.data.send_initial_metadata.count = pc->c2p_initial_metadata.count;
op.data.send_initial_metadata.metadata = pc->c2p_initial_metadata.metadata;
refpc(pc, "on_p2s_sent_initial_metadata");
- err = grpc_call_start_batch(
- pc->p2s, &op, 1, new_closure(on_p2s_sent_initial_metadata, pc), nullptr);
+ err = grpc_call_start_batch(pc->p2s, &op, 1,
+ new_closure(on_p2s_sent_initial_metadata, pc),
+ nullptr);
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_RECV_MESSAGE;
diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc
index 4ee063fc84..b8ec12586e 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.cc
+++ b/test/core/end2end/fuzzers/api_fuzzer.cc
@@ -249,7 +249,8 @@ static const char* read_cred_artifact(cred_artifact_ctx* ctx, input_stream* inp,
size_t num_builtins) {
uint8_t b = next_byte(inp);
if (b == 0) return nullptr;
- if (b == 1) return ctx->release[ctx->num_release++] = read_string(inp, nullptr);
+ if (b == 1)
+ return ctx->release[ctx->num_release++] = read_string(inp, nullptr);
if (b >= num_builtins + 1) {
end(inp);
return nullptr;
@@ -272,7 +273,8 @@ static grpc_channel_credentials* read_ssl_channel_creds(input_stream* inp) {
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(
- root_certs, private_key != nullptr && certs != nullptr ? &key_cert_pair : nullptr,
+ root_certs,
+ private_key != nullptr && certs != nullptr ? &key_cert_pair : nullptr,
nullptr);
cred_artifact_ctx_finish(&ctx);
return creds;
@@ -317,10 +319,11 @@ static grpc_call_credentials* read_call_creds(input_stream* inp) {
cred_artifact_ctx ctx = CRED_ARTIFACT_CTX_INIT;
const char* auth_token = read_cred_artifact(&ctx, inp, nullptr, 0);
const char* auth_selector = read_cred_artifact(&ctx, inp, nullptr, 0);
- grpc_call_credentials* out = auth_token == nullptr || auth_selector == nullptr
- ? nullptr
- : grpc_google_iam_credentials_create(
- auth_token, auth_selector, nullptr);
+ grpc_call_credentials* out =
+ auth_token == nullptr || auth_selector == nullptr
+ ? nullptr
+ : grpc_google_iam_credentials_create(auth_token, auth_selector,
+ nullptr);
cred_artifact_ctx_finish(&ctx);
return out;
}
@@ -388,7 +391,8 @@ static void finish_resolve(grpc_exec_ctx* exec_ctx, void* arg,
*r->addrs = addrs;
} else if (r->lb_addrs != nullptr) {
grpc_lb_addresses* lb_addrs = grpc_lb_addresses_create(1, nullptr);
- grpc_lb_addresses_set_address(lb_addrs, 0, nullptr, 0, false, nullptr, nullptr);
+ grpc_lb_addresses_set_address(lb_addrs, 0, nullptr, 0, false, nullptr,
+ nullptr);
*r->lb_addrs = lb_addrs;
}
GRPC_CLOSURE_SCHED(exec_ctx, r->on_done, GRPC_ERROR_NONE);
@@ -465,7 +469,8 @@ static void do_connect(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
grpc_transport* transport =
grpc_create_chttp2_transport(exec_ctx, nullptr, server, 0);
- grpc_server_setup_transport(exec_ctx, g_server, transport, nullptr, nullptr);
+ grpc_server_setup_transport(exec_ctx, g_server, transport, nullptr,
+ nullptr);
grpc_chttp2_transport_start_reading(exec_ctx, transport, nullptr);
GRPC_CLOSURE_SCHED(exec_ctx, fc->closure, GRPC_ERROR_NONE);
@@ -1084,8 +1089,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (ok) {
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, nullptr);
+ grpc_call_error error = grpc_call_start_batch(
+ g_active_call->call, ops, num_ops, v, nullptr);
if (error != GRPC_CALL_OK) {
v->validate(v->arg, false);
gpr_free(v);
@@ -1133,7 +1138,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (g_channel != nullptr) {
pending_pings++;
grpc_channel_ping(g_channel, cq,
- create_validator(decrement, &pending_pings), nullptr);
+ create_validator(decrement, &pending_pings),
+ nullptr);
} else {
end(&inp);
}
@@ -1195,7 +1201,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
gpr_asprintf(&target_uri, "dns:%s", target);
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, nullptr);
+ g_channel =
+ grpc_secure_channel_create(creds, target_uri, args, nullptr);
GPR_ASSERT(g_channel != nullptr);
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc
index e4255a7a0a..ebc8c2780d 100644
--- a/test/core/end2end/fuzzers/client_fuzzer.cc
+++ b/test/core/end2end/fuzzers/client_fuzzer.cc
@@ -113,7 +113,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_event ev;
while (1) {
grpc_exec_ctx_flush(&exec_ctx);
- ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
switch (ev.type) {
case GRPC_QUEUE_TIMEOUT:
goto done;
@@ -130,12 +131,14 @@ done:
grpc_call_cancel(call, nullptr);
}
for (int i = 0; i < requested_calls; i++) {
- ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
}
grpc_completion_queue_shutdown(cq);
for (int i = 0; i < requested_calls; i++) {
- ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
}
grpc_call_unref(call);
diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc
index 177f6b47c4..fb6477b579 100644
--- a/test/core/end2end/fuzzers/server_fuzzer.cc
+++ b/test/core/end2end/fuzzers/server_fuzzer.cc
@@ -80,7 +80,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_event ev;
while (1) {
grpc_exec_ctx_flush(&exec_ctx);
- ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
switch (ev.type) {
case GRPC_QUEUE_TIMEOUT:
goto done;
@@ -103,12 +104,14 @@ done:
grpc_server_shutdown_and_notify(server, cq, tag(0xdead));
grpc_server_cancel_all_calls(server);
for (int i = 0; i <= requested_calls; i++) {
- ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
}
grpc_completion_queue_shutdown(cq);
for (int i = 0; i <= requested_calls; i++) {
- ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
}
grpc_server_destroy(server);
diff --git a/test/core/end2end/goaway_server_test.cc b/test/core/end2end/goaway_server_test.cc
index 1d37848b3f..2d0db967c3 100644
--- a/test/core/end2end/goaway_server_test.cc
+++ b/test/core/end2end/goaway_server_test.cc
@@ -176,7 +176,8 @@ int main(int argc, char** argv) {
client_args.num_args = 1;
/* create a channel that picks first amongst the servers */
- grpc_channel* chan = grpc_insecure_channel_create("test", &client_args, nullptr);
+ grpc_channel* chan =
+ grpc_insecure_channel_create("test", &client_args, nullptr);
/* and an initial call to them */
grpc_slice host = grpc_slice_from_static_string("127.0.0.1");
grpc_call* call1 =
diff --git a/test/core/end2end/invalid_call_argument_test.cc b/test/core/end2end/invalid_call_argument_test.cc
index ff7f710095..cb6b4c08ef 100644
--- a/test/core/end2end/invalid_call_argument_test.cc
+++ b/test/core/end2end/invalid_call_argument_test.cc
@@ -72,7 +72,8 @@ static void prepare_test(int is_client) {
grpc_slice host = grpc_slice_from_static_string("nonexistant");
g_state.call = grpc_channel_create_call(
g_state.chan, nullptr, GRPC_PROPAGATE_DEFAULTS, g_state.cq,
- grpc_slice_from_static_string("/Foo"), &host, g_state.deadline, nullptr);
+ grpc_slice_from_static_string("/Foo"), &host, g_state.deadline,
+ nullptr);
} else {
g_state.server = grpc_server_create(nullptr, nullptr);
grpc_server_register_completion_queue(g_state.server, g_state.cq, nullptr);
@@ -81,12 +82,14 @@ static void prepare_test(int is_client) {
grpc_server_start(g_state.server);
gpr_free(server_hostport);
gpr_join_host_port(&server_hostport, "localhost", port);
- g_state.chan = grpc_insecure_channel_create(server_hostport, nullptr, nullptr);
+ g_state.chan =
+ grpc_insecure_channel_create(server_hostport, nullptr, nullptr);
gpr_free(server_hostport);
grpc_slice host = grpc_slice_from_static_string("bar");
g_state.call = grpc_channel_create_call(
g_state.chan, nullptr, GRPC_PROPAGATE_DEFAULTS, g_state.cq,
- grpc_slice_from_static_string("/Foo"), &host, g_state.deadline, nullptr);
+ grpc_slice_from_static_string("/Foo"), &host, g_state.deadline,
+ nullptr);
grpc_metadata_array_init(&g_state.server_initial_metadata_recv);
grpc_call_details_init(&g_state.call_details);
op = g_state.ops;
@@ -162,7 +165,8 @@ static void test_non_null_reserved_on_op() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -192,7 +196,8 @@ static void test_send_initial_metadata_more_than_once() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -210,7 +215,8 @@ static void test_too_many_metadata() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_INVALID_METADATA ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -233,7 +239,8 @@ static void test_send_null_message() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_INVALID_MESSAGE ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -264,7 +271,8 @@ static void test_send_messages_at_the_same_time() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
grpc_byte_buffer_destroy(request_payload);
cleanup_test();
}
@@ -286,7 +294,8 @@ static void test_send_server_status_from_client() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_NOT_ON_CLIENT ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -316,7 +325,8 @@ static void test_receive_initial_metadata_twice_at_client() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -334,7 +344,8 @@ static void test_receive_message_with_invalid_flags() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_INVALID_FLAGS ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -357,7 +368,8 @@ static void test_receive_two_messages_at_the_same_time() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -375,7 +387,8 @@ static void test_recv_close_on_server_from_client() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_NOT_ON_CLIENT ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -410,7 +423,8 @@ static void test_recv_status_on_client_twice() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
@@ -427,7 +441,8 @@ static void test_send_close_from_client_on_server() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_NOT_ON_SERVER ==
grpc_call_start_batch(g_state.server_call, g_state.ops,
- (size_t)(op - g_state.ops), tag(2), nullptr));
+ (size_t)(op - g_state.ops), tag(2),
+ nullptr));
cleanup_test();
}
@@ -448,7 +463,8 @@ static void test_recv_status_on_client_from_server() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_NOT_ON_SERVER ==
grpc_call_start_batch(g_state.server_call, g_state.ops,
- (size_t)(op - g_state.ops), tag(2), nullptr));
+ (size_t)(op - g_state.ops), tag(2),
+ nullptr));
cleanup_test();
}
@@ -469,7 +485,8 @@ static void test_send_status_from_server_with_invalid_flags() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_INVALID_FLAGS ==
grpc_call_start_batch(g_state.server_call, g_state.ops,
- (size_t)(op - g_state.ops), tag(2), nullptr));
+ (size_t)(op - g_state.ops), tag(2),
+ nullptr));
cleanup_test();
}
@@ -491,7 +508,8 @@ static void test_too_many_trailing_metadata() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_INVALID_METADATA ==
grpc_call_start_batch(g_state.server_call, g_state.ops,
- (size_t)(op - g_state.ops), tag(2), nullptr));
+ (size_t)(op - g_state.ops), tag(2),
+ nullptr));
cleanup_test();
}
@@ -519,7 +537,8 @@ static void test_send_server_status_twice() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS ==
grpc_call_start_batch(g_state.server_call, g_state.ops,
- (size_t)(op - g_state.ops), tag(2), nullptr));
+ (size_t)(op - g_state.ops), tag(2),
+ nullptr));
cleanup_test();
}
@@ -537,7 +556,8 @@ static void test_recv_close_on_server_with_invalid_flags() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_INVALID_FLAGS ==
grpc_call_start_batch(g_state.server_call, g_state.ops,
- (size_t)(op - g_state.ops), tag(2), nullptr));
+ (size_t)(op - g_state.ops), tag(2),
+ nullptr));
cleanup_test();
}
@@ -560,7 +580,8 @@ static void test_recv_close_on_server_twice() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_TOO_MANY_OPERATIONS ==
grpc_call_start_batch(g_state.server_call, g_state.ops,
- (size_t)(op - g_state.ops), tag(2), nullptr));
+ (size_t)(op - g_state.ops), tag(2),
+ nullptr));
cleanup_test();
}
@@ -582,7 +603,8 @@ static void test_invalid_initial_metadata_reserved_key() {
op++;
GPR_ASSERT(GRPC_CALL_ERROR_INVALID_METADATA ==
grpc_call_start_batch(g_state.call, g_state.ops,
- (size_t)(op - g_state.ops), tag(1), nullptr));
+ (size_t)(op - g_state.ops), tag(1),
+ nullptr));
cleanup_test();
}
diff --git a/test/core/end2end/no_server_test.cc b/test/core/end2end/no_server_test.cc
index a35ec575fd..6113885171 100644
--- a/test/core/end2end/no_server_test.cc
+++ b/test/core/end2end/no_server_test.cc
@@ -68,8 +68,9 @@ int main(int argc, char** argv) {
op->flags = 0;
op->reserved = nullptr;
op++;
- GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(
- call, ops, (size_t)(op - ops), tag(1), nullptr));
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(call, ops,
+ (size_t)(op - ops), tag(1),
+ nullptr));
/* verify that all tags get completed */
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
@@ -77,9 +78,9 @@ int main(int argc, char** argv) {
GPR_ASSERT(status == GRPC_STATUS_DEADLINE_EXCEEDED);
grpc_completion_queue_shutdown(cq);
- while (
- grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr)
- .type != GRPC_QUEUE_SHUTDOWN)
+ while (grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME),
+ nullptr)
+ .type != GRPC_QUEUE_SHUTDOWN)
;
grpc_completion_queue_destroy(cq);
grpc_call_unref(call);
diff --git a/test/core/end2end/tests/binary_metadata.cc b/test/core/end2end/tests/binary_metadata.cc
index b22bd35711..381671e331 100644
--- a/test/core/end2end/tests/binary_metadata.cc
+++ b/test/core/end2end/tests/binary_metadata.cc
@@ -119,8 +119,9 @@ static void test_request_response_with_metadata_and_payload(
"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"),
0,
{{nullptr, nullptr, nullptr, nullptr}}}};
- grpc_end2end_test_fixture f = begin_test(
- config, "test_request_response_with_metadata_and_payload", nullptr, nullptr);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_request_response_with_metadata_and_payload",
+ nullptr, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op* op;
diff --git a/test/core/end2end/tests/call_creds.cc b/test/core/end2end/tests/call_creds.cc
index fb9d8554ce..e1c868232c 100644
--- a/test/core/end2end/tests/call_creds.cc
+++ b/test/core/end2end/tests/call_creds.cc
@@ -170,8 +170,8 @@ static void request_response_with_payload_and_call_creds(
break;
case OVERRIDE:
grpc_call_credentials_release(creds);
- creds = grpc_google_iam_credentials_create(overridden_iam_token,
- overridden_iam_selector, nullptr);
+ creds = grpc_google_iam_credentials_create(
+ overridden_iam_token, overridden_iam_selector, nullptr);
GPR_ASSERT(creds != nullptr);
GPR_ASSERT(grpc_call_set_credentials(c, creds) == GRPC_CALL_OK);
break;
diff --git a/test/core/end2end/tests/cancel_after_client_done.cc b/test/core/end2end/tests/cancel_after_client_done.cc
index 28379a2f6e..9b832d435d 100644
--- a/test/core/end2end/tests/cancel_after_client_done.cc
+++ b/test/core/end2end/tests/cancel_after_client_done.cc
@@ -94,8 +94,9 @@ static void test_cancel_after_accept_and_writes_closed(
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, nullptr, nullptr);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_cancel_after_accept_and_writes_closed", mode,
+ nullptr, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
diff --git a/test/core/end2end/tests/cancel_after_round_trip.cc b/test/core/end2end/tests/cancel_after_round_trip.cc
index 6d547662dd..ddcec67de5 100644
--- a/test/core/end2end/tests/cancel_after_round_trip.cc
+++ b/test/core/end2end/tests/cancel_after_round_trip.cc
@@ -140,8 +140,9 @@ static void test_cancel_after_round_trip(grpc_end2end_test_config config,
args = grpc_channel_args_copy_and_add(args, &arg, 1);
}
- grpc_end2end_test_fixture f = begin_test(
- config, "cancel_after_round_trip", mode, use_service_config, args, nullptr);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "cancel_after_round_trip", mode, use_service_config,
+ args, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
gpr_timespec deadline = use_service_config
diff --git a/test/core/end2end/tests/cancel_with_status.cc b/test/core/end2end/tests/cancel_with_status.cc
index cc5498d6b3..c867751d53 100644
--- a/test/core/end2end/tests/cancel_with_status.cc
+++ b/test/core/end2end/tests/cancel_with_status.cc
@@ -167,7 +167,8 @@ static void test_invoke_simple_request(grpc_end2end_test_config config,
size_t num_ops) {
grpc_end2end_test_fixture f;
- f = begin_test(config, "test_invoke_simple_request", num_ops, nullptr, nullptr);
+ f = begin_test(config, "test_invoke_simple_request", num_ops, nullptr,
+ nullptr);
simple_request_body(config, f, num_ops);
end_test(&f);
config.tear_down_data(&f);
diff --git a/test/core/end2end/tests/compressed_payload.cc b/test/core/end2end/tests/compressed_payload.cc
index 8ffcbe89cb..a8ea0ff2e0 100644
--- a/test/core/end2end/tests/compressed_payload.cc
+++ b/test/core/end2end/tests/compressed_payload.cc
@@ -421,7 +421,8 @@ static void request_with_payload_template(
op->flags = client_send_flags_bitmask;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr);
+ error =
+ grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
}
@@ -433,7 +434,8 @@ static void request_with_payload_template(
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
@@ -451,7 +453,8 @@ static void request_with_payload_template(
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
memset(ops, 0, sizeof(ops));
@@ -560,8 +563,8 @@ static void test_invoke_request_with_uncompressed_payload(
request_with_payload_template(
config, "test_invoke_request_with_uncompressed_payload", 0,
GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
- GRPC_COMPRESS_NONE, nullptr, false, /* ignored */ GRPC_COMPRESS_LEVEL_NONE,
- false);
+ GRPC_COMPRESS_NONE, nullptr, false,
+ /* ignored */ GRPC_COMPRESS_LEVEL_NONE, false);
}
static void test_invoke_request_with_compressed_payload(
@@ -569,8 +572,8 @@ static void test_invoke_request_with_compressed_payload(
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload", 0,
GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
- GRPC_COMPRESS_GZIP, nullptr, false, /* ignored */ GRPC_COMPRESS_LEVEL_NONE,
- false);
+ GRPC_COMPRESS_GZIP, nullptr, false,
+ /* ignored */ GRPC_COMPRESS_LEVEL_NONE, false);
}
static void test_invoke_request_with_send_message_before_initial_metadata(
@@ -578,8 +581,8 @@ static void test_invoke_request_with_send_message_before_initial_metadata(
request_with_payload_template(
config, "test_invoke_request_with_compressed_payload", 0,
GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
- GRPC_COMPRESS_GZIP, nullptr, false, /* ignored */ GRPC_COMPRESS_LEVEL_NONE,
- true);
+ GRPC_COMPRESS_GZIP, nullptr, false,
+ /* ignored */ GRPC_COMPRESS_LEVEL_NONE, true);
}
static void test_invoke_request_with_server_level(
@@ -630,9 +633,10 @@ static void test_invoke_request_with_compressed_payload_md_override(
static void test_invoke_request_with_disabled_algorithm(
grpc_end2end_test_config config) {
- request_for_disabled_algorithm(
- config, "test_invoke_request_with_disabled_algorithm", 0,
- GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_STATUS_UNIMPLEMENTED, nullptr);
+ request_for_disabled_algorithm(config,
+ "test_invoke_request_with_disabled_algorithm",
+ 0, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP,
+ GRPC_STATUS_UNIMPLEMENTED, nullptr);
}
void compressed_payload(grpc_end2end_test_config config) {
diff --git a/test/core/end2end/tests/filter_latency.cc b/test/core/end2end/tests/filter_latency.cc
index 07fee4c451..c4d96ebfe2 100644
--- a/test/core/end2end/tests/filter_latency.cc
+++ b/test/core/end2end/tests/filter_latency.cc
@@ -321,8 +321,8 @@ static bool maybe_add_filter(grpc_exec_ctx* exec_ctx,
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(it, filter, nullptr, nullptr);
+ const bool retval = grpc_channel_stack_builder_add_filter_before(
+ it, filter, nullptr, nullptr);
grpc_channel_stack_builder_iterator_destroy(it);
return retval;
} else {
diff --git a/test/core/end2end/tests/graceful_server_shutdown.cc b/test/core/end2end/tests/graceful_server_shutdown.cc
index 1c8acf37a4..bf11b49fa4 100644
--- a/test/core/end2end/tests/graceful_server_shutdown.cc
+++ b/test/core/end2end/tests/graceful_server_shutdown.cc
@@ -84,8 +84,9 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_end2end_test_config config) {
grpc_call* c;
grpc_call* s;
- grpc_end2end_test_fixture f = begin_test(
- config, "test_early_server_shutdown_finishes_inflight_calls", nullptr, nullptr);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_early_server_shutdown_finishes_inflight_calls",
+ nullptr, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op* op;
diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc
index e9c3785057..f1ac27fa7c 100644
--- a/test/core/end2end/tests/max_message_length.cc
+++ b/test/core/end2end/tests/max_message_length.cc
@@ -174,8 +174,10 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
server_args);
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- if (client_args != nullptr) grpc_channel_args_destroy(&exec_ctx, client_args);
- if (server_args != nullptr) grpc_channel_args_destroy(&exec_ctx, server_args);
+ if (client_args != nullptr)
+ grpc_channel_args_destroy(&exec_ctx, client_args);
+ if (server_args != nullptr)
+ grpc_channel_args_destroy(&exec_ctx, server_args);
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -365,8 +367,10 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
server_args);
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- if (client_args != nullptr) grpc_channel_args_destroy(&exec_ctx, client_args);
- if (server_args != nullptr) grpc_channel_args_destroy(&exec_ctx, server_args);
+ if (client_args != nullptr)
+ grpc_channel_args_destroy(&exec_ctx, client_args);
+ if (server_args != nullptr)
+ grpc_channel_args_destroy(&exec_ctx, server_args);
grpc_exec_ctx_finish(&exec_ctx);
}
cqv = cq_verifier_create(f.cq);
diff --git a/test/core/end2end/tests/ping_pong_streaming.cc b/test/core/end2end/tests/ping_pong_streaming.cc
index 47aebe52a1..ec7981fdcb 100644
--- a/test/core/end2end/tests/ping_pong_streaming.cc
+++ b/test/core/end2end/tests/ping_pong_streaming.cc
@@ -195,7 +195,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
@@ -207,7 +208,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
diff --git a/test/core/end2end/tests/shutdown_finishes_calls.cc b/test/core/end2end/tests/shutdown_finishes_calls.cc
index b939877cf0..fce23f3b6a 100644
--- a/test/core/end2end/tests/shutdown_finishes_calls.cc
+++ b/test/core/end2end/tests/shutdown_finishes_calls.cc
@@ -77,8 +77,9 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_end2end_test_config config) {
grpc_call* c;
grpc_call* s;
- grpc_end2end_test_fixture f = begin_test(
- config, "test_early_server_shutdown_finishes_inflight_calls", nullptr, nullptr);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_early_server_shutdown_finishes_inflight_calls",
+ nullptr, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op* op;
diff --git a/test/core/end2end/tests/simple_cacheable_request.cc b/test/core/end2end/tests/simple_cacheable_request.cc
index 02c9f49d52..d8034dcf6d 100644
--- a/test/core/end2end/tests/simple_cacheable_request.cc
+++ b/test/core/end2end/tests/simple_cacheable_request.cc
@@ -116,8 +116,8 @@ static void test_cacheable_request_response_with_metadata_and_payload(
0,
{{nullptr, nullptr, nullptr, nullptr}}}};
grpc_end2end_test_fixture f = begin_test(
- config, "test_cacheable_request_response_with_metadata_and_payload", nullptr,
- nullptr);
+ config, "test_cacheable_request_response_with_metadata_and_payload",
+ nullptr, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op* op;
diff --git a/test/core/end2end/tests/simple_metadata.cc b/test/core/end2end/tests/simple_metadata.cc
index 38adcbae28..1a741169d4 100644
--- a/test/core/end2end/tests/simple_metadata.cc
+++ b/test/core/end2end/tests/simple_metadata.cc
@@ -113,8 +113,9 @@ static void test_request_response_with_metadata_and_payload(
grpc_slice_from_static_string("val4"),
0,
{{nullptr, nullptr, nullptr, nullptr}}}};
- grpc_end2end_test_fixture f = begin_test(
- config, "test_request_response_with_metadata_and_payload", nullptr, nullptr);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_request_response_with_metadata_and_payload",
+ nullptr, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op* op;
diff --git a/test/core/end2end/tests/stream_compression_compressed_payload.cc b/test/core/end2end/tests/stream_compression_compressed_payload.cc
index e662a38a30..d73346468a 100644
--- a/test/core/end2end/tests/stream_compression_compressed_payload.cc
+++ b/test/core/end2end/tests/stream_compression_compressed_payload.cc
@@ -440,7 +440,8 @@ static void request_with_payload_template(
op->flags = client_send_flags_bitmask;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr);
+ error =
+ grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
}
@@ -452,7 +453,8 @@ static void request_with_payload_template(
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
@@ -468,7 +470,8 @@ static void request_with_payload_template(
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
memset(ops, 0, sizeof(ops));
@@ -580,8 +583,8 @@ static void test_invoke_request_with_server_level(
config, "test_invoke_request_with_server_level", 0,
GRPC_STREAM_COMPRESS_NONE, GRPC_STREAM_COMPRESS_NONE,
GRPC_STREAM_COMPRESS_NONE, GRPC_STREAM_COMPRESS_GZIP,
- /* ignored */ nullptr, true, GRPC_STREAM_COMPRESS_LEVEL_HIGH, false, false,
- GRPC_COMPRESS_NONE);
+ /* ignored */ nullptr, true, GRPC_STREAM_COMPRESS_LEVEL_HIGH, false,
+ false, GRPC_COMPRESS_NONE);
}
static void test_invoke_request_with_compressed_payload_md_override(
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 1cd87c9d9c..d3b526f04e 100644
--- a/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
+++ b/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc
@@ -204,7 +204,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
@@ -216,7 +217,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
diff --git a/test/core/end2end/tests/streaming_error_response.cc b/test/core/end2end/tests/streaming_error_response.cc
index d011b6aa36..fe53fda9ef 100644
--- a/test/core/end2end/tests/streaming_error_response.cc
+++ b/test/core/end2end/tests/streaming_error_response.cc
@@ -99,8 +99,9 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
grpc_slice response_payload2_slice = grpc_slice_from_copied_string("world");
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",
- nullptr, nullptr, request_status_early);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "streaming_error_response", nullptr, nullptr,
+ request_status_early);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op* op;
diff --git a/test/core/end2end/tests/trailing_metadata.cc b/test/core/end2end/tests/trailing_metadata.cc
index 8a6be7a892..afc56c8dfa 100644
--- a/test/core/end2end/tests/trailing_metadata.cc
+++ b/test/core/end2end/tests/trailing_metadata.cc
@@ -121,8 +121,9 @@ static void test_request_response_with_metadata_and_payload(
grpc_slice_from_static_string("val6"),
0,
{{nullptr, nullptr, nullptr, nullptr}}}};
- grpc_end2end_test_fixture f = begin_test(
- config, "test_request_response_with_metadata_and_payload", nullptr, nullptr);
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_request_response_with_metadata_and_payload",
+ nullptr, nullptr);
cq_verifier* cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op* op;
diff --git a/test/core/end2end/tests/workaround_cronet_compression.cc b/test/core/end2end/tests/workaround_cronet_compression.cc
index 71d461f469..bc4d5079d8 100644
--- a/test/core/end2end/tests/workaround_cronet_compression.cc
+++ b/test/core/end2end/tests/workaround_cronet_compression.cc
@@ -258,7 +258,8 @@ static void request_with_payload_template(
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
@@ -275,7 +276,8 @@ static void request_with_payload_template(
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
diff --git a/test/core/fling/server.cc b/test/core/fling/server.cc
index dfe96136fb..f3a8a1ccf8 100644
--- a/test/core/fling/server.cc
+++ b/test/core/fling/server.cc
@@ -234,10 +234,10 @@ int main(int argc, char** argv) {
shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr);
grpc_server_shutdown_and_notify(server, shutdown_cq, tag(1000));
- GPR_ASSERT(
- grpc_completion_queue_pluck(shutdown_cq, tag(1000),
- grpc_timeout_seconds_to_deadline(5), nullptr)
- .type == GRPC_OP_COMPLETE);
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ shutdown_cq, tag(1000),
+ grpc_timeout_seconds_to_deadline(5), nullptr)
+ .type == GRPC_OP_COMPLETE);
grpc_completion_queue_destroy(shutdown_cq);
grpc_completion_queue_shutdown(cq);
diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc
index b9e3051dcd..81e9374819 100644
--- a/test/core/http/httpcli_test.cc
+++ b/test/core/http/httpcli_test.cc
@@ -53,7 +53,8 @@ static void on_finish(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
g_done = 1;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_kick",
- grpc_pollset_kick(exec_ctx, grpc_polling_entity_pollset(&g_pops), nullptr)));
+ grpc_pollset_kick(exec_ctx, grpc_polling_entity_pollset(&g_pops),
+ nullptr)));
gpr_mu_unlock(g_mu);
}
diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc
index cac0ed5ce7..da8405c049 100644
--- a/test/core/http/httpscli_test.cc
+++ b/test/core/http/httpscli_test.cc
@@ -53,7 +53,8 @@ static void on_finish(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
g_done = 1;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_kick",
- grpc_pollset_kick(exec_ctx, grpc_polling_entity_pollset(&g_pops), nullptr)));
+ grpc_pollset_kick(exec_ctx, grpc_polling_entity_pollset(&g_pops),
+ nullptr)));
gpr_mu_unlock(g_mu);
}
diff --git a/test/core/iomgr/endpoint_tests.cc b/test/core/iomgr/endpoint_tests.cc
index 83aa23a60f..026e34105d 100644
--- a/test/core/iomgr/endpoint_tests.cc
+++ b/test/core/iomgr/endpoint_tests.cc
@@ -258,8 +258,8 @@ static void inc_on_failure(grpc_exec_ctx* exec_ctx, void* arg,
grpc_error* error) {
gpr_mu_lock(g_mu);
*(int*)arg += (error != GRPC_ERROR_NONE);
- GPR_ASSERT(
- GRPC_LOG_IF_ERROR("kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
diff --git a/test/core/iomgr/fd_posix_test.cc b/test/core/iomgr/fd_posix_test.cc
index 240588bf52..a03d841ecd 100644
--- a/test/core/iomgr/fd_posix_test.cc
+++ b/test/core/iomgr/fd_posix_test.cc
@@ -115,8 +115,8 @@ static void session_shutdown_cb(grpc_exec_ctx* exec_ctx, void* arg, /*session */
bool success) {
session* se = static_cast<session*>(arg);
server* sv = se->sv;
- grpc_fd_orphan(exec_ctx, se->em_fd, nullptr, nullptr, false /* already_closed */,
- "a");
+ grpc_fd_orphan(exec_ctx, se->em_fd, nullptr, nullptr,
+ false /* already_closed */, "a");
gpr_free(se);
/* Start to shutdown listen fd. */
grpc_fd_shutdown(exec_ctx, sv->em_fd,
@@ -173,13 +173,13 @@ static void listen_shutdown_cb(grpc_exec_ctx* exec_ctx, void* arg /*server */,
int success) {
server* sv = static_cast<server*>(arg);
- grpc_fd_orphan(exec_ctx, sv->em_fd, nullptr, nullptr, false /* already_closed */,
- "b");
+ grpc_fd_orphan(exec_ctx, sv->em_fd, nullptr, nullptr,
+ false /* already_closed */, "b");
gpr_mu_lock(g_mu);
sv->done = 1;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
@@ -292,11 +292,11 @@ static void client_init(client* cl) {
static void client_session_shutdown_cb(grpc_exec_ctx* exec_ctx,
void* arg /*client */, int success) {
client* cl = static_cast<client*>(arg);
- grpc_fd_orphan(exec_ctx, cl->em_fd, nullptr, nullptr, false /* already_closed */,
- "c");
+ grpc_fd_orphan(exec_ctx, cl->em_fd, nullptr, nullptr,
+ false /* already_closed */, "c");
cl->done = 1;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
}
/* Write as much as possible, then register notify_on_write. */
@@ -413,8 +413,8 @@ static void first_read_callback(grpc_exec_ctx* exec_ctx,
gpr_mu_lock(g_mu);
fdc->cb_that_ran = first_read_callback;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
@@ -425,8 +425,8 @@ static void second_read_callback(grpc_exec_ctx* exec_ctx,
gpr_mu_lock(g_mu);
fdc->cb_that_ran = second_read_callback;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
@@ -507,7 +507,8 @@ static void test_grpc_fd_change(void) {
GPR_ASSERT(b.cb_that_ran == second_read_callback);
gpr_mu_unlock(g_mu);
- grpc_fd_orphan(&exec_ctx, em_fd, nullptr, nullptr, false /* already_closed */, "d");
+ grpc_fd_orphan(&exec_ctx, em_fd, nullptr, nullptr, false /* already_closed */,
+ "d");
grpc_exec_ctx_finish(&exec_ctx);
destroy_change_data(&a);
destroy_change_data(&b);
diff --git a/test/core/iomgr/resource_quota_test.cc b/test/core/iomgr/resource_quota_test.cc
index a0ce4018dc..6851702e67 100644
--- a/test/core/iomgr/resource_quota_test.cc
+++ b/test/core/iomgr/resource_quota_test.cc
@@ -189,7 +189,8 @@ static void test_async_alloc_blocked_by_size(void) {
&ev, grpc_timeout_milliseconds_to_deadline(100)) == nullptr);
}
grpc_resource_quota_resize(q, 1024);
- GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != nullptr);
+ GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) !=
+ nullptr);
;
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
@@ -638,8 +639,8 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_event(&allocated));
grpc_exec_ctx_finish(&exec_ctx);
- GPR_ASSERT(gpr_event_wait(&allocated,
- grpc_timeout_seconds_to_deadline(5)) != nullptr);
+ GPR_ASSERT(gpr_event_wait(&allocated, grpc_timeout_seconds_to_deadline(
+ 5)) != nullptr);
GPR_ASSERT(gpr_event_wait(&reclaimer_cancelled,
grpc_timeout_milliseconds_to_deadline(100)) ==
nullptr);
@@ -657,7 +658,8 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(
grpc_resource_user_free(&exec_ctx, usr, 1024);
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(gpr_event_wait(&reclaimer_cancelled,
- grpc_timeout_seconds_to_deadline(5)) != nullptr);
+ grpc_timeout_seconds_to_deadline(5)) !=
+ nullptr);
}
}
grpc_resource_quota_unref(q);
@@ -697,10 +699,11 @@ static void test_reclaimers_can_be_posted_repeatedly(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_event(&allocated));
grpc_exec_ctx_finish(&exec_ctx);
- GPR_ASSERT(gpr_event_wait(&allocated,
- grpc_timeout_seconds_to_deadline(5)) != nullptr);
+ GPR_ASSERT(gpr_event_wait(&allocated, grpc_timeout_seconds_to_deadline(
+ 5)) != nullptr);
GPR_ASSERT(gpr_event_wait(&reclaimer_done,
- grpc_timeout_seconds_to_deadline(5)) != nullptr);
+ grpc_timeout_seconds_to_deadline(5)) !=
+ nullptr);
}
}
{
diff --git a/test/core/iomgr/tcp_client_posix_test.cc b/test/core/iomgr/tcp_client_posix_test.cc
index c87c146c34..9fb1a2d770 100644
--- a/test/core/iomgr/tcp_client_posix_test.cc
+++ b/test/core/iomgr/tcp_client_posix_test.cc
@@ -54,8 +54,8 @@ static void finish_connection() {
gpr_mu_lock(g_mu);
g_connections_complete++;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(&exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(&exec_ctx, g_pollset, nullptr)));
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_unlock(g_mu);
}
@@ -108,8 +108,8 @@ void test_succeeds(void) {
GPR_ASSERT(getsockname(svr_fd, (struct sockaddr*)addr,
(socklen_t*)&resolved_addr.len) == 0);
GRPC_CLOSURE_INIT(&done, must_succeed, nullptr, grpc_schedule_on_exec_ctx);
- grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, nullptr,
- &resolved_addr, GRPC_MILLIS_INF_FUTURE);
+ grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set,
+ nullptr, &resolved_addr, GRPC_MILLIS_INF_FUTURE);
/* await the connection */
do {
@@ -157,8 +157,8 @@ void test_fails(void) {
/* connect to a broken address */
GRPC_CLOSURE_INIT(&done, must_fail, nullptr, grpc_schedule_on_exec_ctx);
- grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, nullptr,
- &resolved_addr, GRPC_MILLIS_INF_FUTURE);
+ grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set,
+ nullptr, &resolved_addr, GRPC_MILLIS_INF_FUTURE);
gpr_mu_lock(g_mu);
diff --git a/test/core/iomgr/tcp_posix_test.cc b/test/core/iomgr/tcp_posix_test.cc
index 98b3d1594d..7986dc2b19 100644
--- a/test/core/iomgr/tcp_posix_test.cc
+++ b/test/core/iomgr/tcp_posix_test.cc
@@ -147,8 +147,8 @@ static void read_cb(grpc_exec_ctx* exec_ctx, void* user_data,
gpr_log(GPR_INFO, "Read %" PRIuPTR " bytes of %" PRIuPTR, read_bytes,
state->target_read_bytes);
if (state->read_bytes >= state->target_read_bytes) {
- GPR_ASSERT(GRPC_LOG_IF_ERROR("kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
} else {
grpc_endpoint_read(exec_ctx, state->ep, &state->incoming, &state->read_cb);
@@ -297,8 +297,8 @@ static void write_done(grpc_exec_ctx* exec_ctx,
gpr_mu_lock(g_mu);
gpr_log(GPR_INFO, "Signalling write done");
state->write_done = 1;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
@@ -408,8 +408,8 @@ static void write_test(size_t num_bytes, size_t slice_size) {
void on_fd_released(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* errors) {
int* done = (int*)arg;
*done = 1;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
}
/* Do a read_test, then release fd and try to read/write again. Verify that
diff --git a/test/core/iomgr/tcp_server_posix_test.cc b/test/core/iomgr/tcp_server_posix_test.cc
index 2651d29f99..48d8d425a5 100644
--- a/test/core/iomgr/tcp_server_posix_test.cc
+++ b/test/core/iomgr/tcp_server_posix_test.cc
@@ -159,8 +159,8 @@ static void on_connect(grpc_exec_ctx* exec_ctx, void* arg, grpc_endpoint* tcp,
gpr_mu_lock(g_mu);
g_result = temp_result;
g_nconnects++;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
diff --git a/test/core/iomgr/udp_server_test.cc b/test/core/iomgr/udp_server_test.cc
index 08871695a7..803f017106 100644
--- a/test/core/iomgr/udp_server_test.cc
+++ b/test/core/iomgr/udp_server_test.cc
@@ -61,8 +61,8 @@ static void on_read(grpc_exec_ctx* exec_ctx, grpc_fd* emfd, void* user_data) {
g_number_of_reads++;
g_number_of_bytes_read += (int)byte_count;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
@@ -70,8 +70,8 @@ static void on_write(grpc_exec_ctx* exec_ctx, grpc_fd* emfd, void* user_data) {
gpr_mu_lock(g_mu);
g_number_of_writes++;
- GPR_ASSERT(GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
+ GPR_ASSERT(GRPC_LOG_IF_ERROR(
+ "pollset_kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
diff --git a/test/core/json/json_stream_error_test.cc b/test/core/json/json_stream_error_test.cc
index 70b00c77f9..b367d3fbf7 100644
--- a/test/core/json/json_stream_error_test.cc
+++ b/test/core/json/json_stream_error_test.cc
@@ -38,7 +38,7 @@ static uint32_t read_char(void* userdata) { return GRPC_JSON_READ_CHAR_ERROR; }
static grpc_json_reader_vtable reader_vtable = {
string_clear, nullptr, nullptr, read_char, nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
static void read_error() {
grpc_json_reader reader;
diff --git a/test/core/memory_usage/client.cc b/test/core/memory_usage/client.cc
index 3741c7f7ad..eb90067970 100644
--- a/test/core/memory_usage/client.cc
+++ b/test/core/memory_usage/client.cc
@@ -142,9 +142,10 @@ static struct grpc_memory_counters send_snapshot_request(int call_idx,
calls[call_idx].call = grpc_channel_create_call(
channel, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, call_type, &hostname,
gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
- GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(
- calls[call_idx].call, snapshot_ops,
- (size_t)(op - snapshot_ops), (void*)nullptr, nullptr));
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(calls[call_idx].call,
+ snapshot_ops,
+ (size_t)(op - snapshot_ops),
+ (void*)nullptr, nullptr));
grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
grpc_byte_buffer_reader reader;
@@ -320,7 +321,8 @@ int main(int argc, char** argv) {
benchmark_iterations,
server_calls_end.total_size_relative -
after_server_create.total_size_relative,
- env_build == nullptr ? "" : env_build, env_job == nullptr ? "" : env_job);
+ env_build == nullptr ? "" : env_build,
+ env_job == nullptr ? "" : env_job);
fclose(csv);
gpr_log(GPR_INFO, "Summary written to %s", csv_file);
}
diff --git a/test/core/memory_usage/server.cc b/test/core/memory_usage/server.cc
index 0d796439ce..60ebcece3e 100644
--- a/test/core/memory_usage/server.cc
+++ b/test/core/memory_usage/server.cc
@@ -88,7 +88,8 @@ static void send_initial_metadata_unary(void* tag) {
metadata_ops[0].data.send_initial_metadata.count = 0;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch((*(fling_call*)tag).call,
- metadata_ops, 1, tag, nullptr));
+ metadata_ops, 1, tag,
+ nullptr));
}
static void send_status(void* tag) {
@@ -99,7 +100,8 @@ static void send_status(void* tag) {
status_op.data.send_status_from_server.status_details = &details;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch((*(fling_call*)tag).call,
- &status_op, 1, tag, nullptr));
+ &status_op, 1, tag,
+ nullptr));
}
static void send_snapshot(void* tag, struct grpc_memory_counters* snapshot) {
@@ -219,10 +221,10 @@ int main(int argc, char** argv) {
shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr);
grpc_server_shutdown_and_notify(server, shutdown_cq, tag(1000));
- GPR_ASSERT(
- grpc_completion_queue_pluck(shutdown_cq, tag(1000),
- grpc_timeout_seconds_to_deadline(5), nullptr)
- .type == GRPC_OP_COMPLETE);
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ shutdown_cq, tag(1000),
+ grpc_timeout_seconds_to_deadline(5), nullptr)
+ .type == GRPC_OP_COMPLETE);
grpc_completion_queue_destroy(shutdown_cq);
grpc_completion_queue_shutdown(cq);
shutdown_started = 1;
diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc
index f9d6e444f3..64d383ad0a 100644
--- a/test/core/security/credentials_test.cc
+++ b/test/core/security/credentials_test.cc
@@ -404,8 +404,8 @@ static void test_google_iam_creds(void) {
grpc_call_credentials* creds = grpc_google_iam_credentials_create(
test_google_iam_authorization_token, test_google_iam_authority_selector,
nullptr);
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
run_request_metadata_test(&exec_ctx, creds, auth_md_ctx, state);
grpc_call_credentials_unref(&exec_ctx, creds);
grpc_exec_ctx_finish(&exec_ctx);
@@ -418,8 +418,8 @@ static void test_access_token_creds(void) {
make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd));
grpc_call_credentials* creds =
grpc_access_token_credentials_create("blah", nullptr);
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0);
run_request_metadata_test(&exec_ctx, creds, auth_md_ctx, state);
grpc_call_credentials_unref(&exec_ctx, creds);
@@ -468,8 +468,8 @@ static void test_oauth2_google_iam_composite_creds(void) {
test_google_iam_authority_selector}};
request_metadata_state* state =
make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd));
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
grpc_call_credentials* oauth2_creds = grpc_md_only_test_credentials_create(
&exec_ctx, "authorization", test_oauth2_bearer_token, 0);
grpc_call_credentials* google_iam_creds = grpc_google_iam_credentials_create(
@@ -517,7 +517,8 @@ static void test_channel_oauth2_google_iam_composite_creds(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_channel_args* new_args;
grpc_channel_credentials_vtable vtable = {
- nullptr, check_channel_oauth2_google_iam_create_security_connector, nullptr};
+ nullptr, check_channel_oauth2_google_iam_create_security_connector,
+ nullptr};
grpc_channel_credentials* channel_creds =
grpc_mock_channel_credentials_create(&vtable);
grpc_call_credentials* oauth2_creds =
@@ -600,8 +601,8 @@ static void test_compute_engine_creds_success(void) {
{"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}};
grpc_call_credentials* creds =
grpc_google_compute_engine_credentials_create(nullptr);
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
/* First request: http get should be called. */
request_metadata_state* state =
@@ -630,8 +631,8 @@ static void test_compute_engine_creds_failure(void) {
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Error occured when fetching oauth2 token."),
nullptr, 0);
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
grpc_call_credentials* creds =
grpc_google_compute_engine_credentials_create(nullptr);
grpc_httpcli_set_override(compute_engine_httpcli_get_failure_override,
@@ -689,8 +690,8 @@ static void test_refresh_token_creds_success(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
expected_md emd[] = {
{"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}};
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
grpc_call_credentials* creds = grpc_google_refresh_token_credentials_create(
test_refresh_token_str, nullptr);
@@ -721,8 +722,8 @@ static void test_refresh_token_creds_failure(void) {
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Error occured when fetching oauth2 token."),
nullptr, 0);
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
grpc_call_credentials* creds = grpc_google_refresh_token_credentials_create(
test_refresh_token_str, nullptr);
grpc_httpcli_set_override(httpcli_get_should_not_be_called,
@@ -821,8 +822,8 @@ static void test_jwt_creds_lifetime(void) {
static void test_jwt_creds_success(void) {
char* json_key_string = test_json_key_str();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
char* expected_md_value;
gpr_asprintf(&expected_md_value, "Bearer %s", test_signed_jwt);
expected_md emd[] = {{"authorization", expected_md_value}};
@@ -864,10 +865,11 @@ static void test_jwt_creds_success(void) {
static void test_jwt_creds_signing_failure(void) {
char* json_key_string = test_json_key_str();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
request_metadata_state* state = make_request_metadata_state(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("Could not generate JWT."), nullptr, 0);
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Could not generate JWT."), nullptr,
+ 0);
grpc_call_credentials* creds =
grpc_service_account_jwt_access_credentials_create(
json_key_string, grpc_max_auth_token_lifetime(), nullptr);
@@ -959,8 +961,8 @@ static void test_google_default_creds_gce(void) {
{"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}};
request_metadata_state* state =
make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd));
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
grpc_flush_cached_google_default_credentials();
gpr_setenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR, ""); /* Reset. */
grpc_override_well_known_credentials_path_getter(
@@ -1092,8 +1094,8 @@ static void test_metadata_plugin_success(void) {
plugin_state state = PLUGIN_INITIAL_STATE;
grpc_metadata_credentials_plugin plugin;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
request_metadata_state* md_state = make_request_metadata_state(
GRPC_ERROR_NONE, plugin_md, GPR_ARRAY_SIZE(plugin_md));
@@ -1115,8 +1117,8 @@ static void test_metadata_plugin_failure(void) {
plugin_state state = PLUGIN_INITIAL_STATE;
grpc_metadata_credentials_plugin plugin;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr,
- nullptr};
+ grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method,
+ nullptr, nullptr};
char* expected_error;
gpr_asprintf(&expected_error,
"Getting metadata from plugin failed with error: %s",
@@ -1234,8 +1236,8 @@ static void test_auth_metadata_context(void) {
grpc_slice_from_copied_string(test_cases[i].call_method);
grpc_auth_metadata_context auth_md_context;
memset(&auth_md_context, 0, sizeof(auth_md_context));
- grpc_auth_metadata_context_build(url_scheme, call_host, call_method, nullptr,
- &auth_md_context);
+ grpc_auth_metadata_context_build(url_scheme, call_host, call_method,
+ nullptr, &auth_md_context);
if (strcmp(auth_md_context.service_url,
test_cases[i].desired_service_url) != 0) {
gpr_log(GPR_ERROR, "Invalid service url, want: %s, got %s.",
diff --git a/test/core/security/fetch_oauth2.cc b/test/core/security/fetch_oauth2.cc
index 69c470641a..cb28a0487c 100644
--- a/test/core/security/fetch_oauth2.cc
+++ b/test/core/security/fetch_oauth2.cc
@@ -60,7 +60,8 @@ int main(int argc, char** argv) {
grpc_init();
- if (json_key_file_path != nullptr && json_refresh_token_file_path != nullptr) {
+ if (json_key_file_path != nullptr &&
+ json_refresh_token_file_path != nullptr) {
gpr_log(GPR_ERROR,
"--json_key and --json_refresh_token are mutually exclusive.");
exit(1);
diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc
index 0dee341169..0b6ccd5e37 100644
--- a/test/core/security/json_token_test.cc
+++ b/test/core/security/json_token_test.cc
@@ -78,7 +78,8 @@ static const char test_scope[] = "myperm1 myperm2";
static const char test_service_url[] = "https://foo.com/foo.v1";
static char* test_json_key_str(const char* bad_part3) {
- const char* part3 = bad_part3 != nullptr ? bad_part3 : test_json_key_str_part3;
+ const char* part3 =
+ bad_part3 != nullptr ? bad_part3 : test_json_key_str_part3;
size_t result_len = strlen(test_json_key_str_part1) +
strlen(test_json_key_str_part2) + strlen(part3);
char* result = static_cast<char*>(gpr_malloc(result_len + 1));
@@ -339,7 +340,8 @@ static void check_jwt_signature(const char* b64_signature, RSA* rsa_key,
GPR_ASSERT(key != nullptr);
EVP_PKEY_set1_RSA(key, rsa_key);
- GPR_ASSERT(EVP_DigestVerifyInit(md_ctx, nullptr, EVP_sha256(), nullptr, key) == 1);
+ GPR_ASSERT(
+ EVP_DigestVerifyInit(md_ctx, nullptr, EVP_sha256(), nullptr, key) == 1);
GPR_ASSERT(EVP_DigestVerifyUpdate(md_ctx, signed_data, signed_data_size) ==
1);
GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(sig),
diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc
index 2d4c6b1b88..a12af02479 100644
--- a/test/core/security/secure_endpoint_test.cc
+++ b/test/core/security/secure_endpoint_test.cc
@@ -44,11 +44,13 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair(
tsi_frame_protector* fake_write_protector =
tsi_create_fake_frame_protector(nullptr);
tsi_zero_copy_grpc_protector* fake_read_zero_copy_protector =
- use_zero_copy_protector ? tsi_create_fake_zero_copy_grpc_protector(nullptr)
- : nullptr;
+ use_zero_copy_protector
+ ? tsi_create_fake_zero_copy_grpc_protector(nullptr)
+ : nullptr;
tsi_zero_copy_grpc_protector* fake_write_zero_copy_protector =
- use_zero_copy_protector ? tsi_create_fake_zero_copy_grpc_protector(nullptr)
- : nullptr;
+ use_zero_copy_protector
+ ? tsi_create_fake_zero_copy_grpc_protector(nullptr)
+ : nullptr;
grpc_endpoint_test_fixture f;
grpc_endpoint_pair tcp;
diff --git a/test/core/support/alloc_test.cc b/test/core/support/alloc_test.cc
index c9e88400ef..6074c6e6e7 100644
--- a/test/core/support/alloc_test.cc
+++ b/test/core/support/alloc_test.cc
@@ -30,7 +30,8 @@ static void test_custom_allocs() {
const gpr_allocation_functions default_fns = gpr_get_allocation_functions();
intptr_t addr_to_free = 0;
char* i;
- gpr_allocation_functions fns = {fake_malloc, nullptr, fake_realloc, fake_free};
+ gpr_allocation_functions fns = {fake_malloc, nullptr, fake_realloc,
+ fake_free};
gpr_set_allocation_functions(fns);
GPR_ASSERT((void*)(size_t)0xdeadbeef == gpr_malloc(0xdeadbeef));
diff --git a/test/core/surface/alarm_test.cc b/test/core/surface/alarm_test.cc
index 6865d2add9..8950603b41 100644
--- a/test/core/surface/alarm_test.cc
+++ b/test/core/surface/alarm_test.cc
@@ -34,7 +34,8 @@ static void* create_test_tag(void) {
static void shutdown_and_destroy(grpc_completion_queue* cc) {
grpc_event ev;
grpc_completion_queue_shutdown(cc);
- ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev =
+ grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cc);
}
@@ -49,7 +50,8 @@ static void test_alarm(void) {
grpc_event ev;
void* tag = create_test_tag();
grpc_alarm* alarm = grpc_alarm_create(nullptr);
- grpc_alarm_set(alarm, cc, grpc_timeout_seconds_to_deadline(1), tag, nullptr);
+ grpc_alarm_set(alarm, cc, grpc_timeout_seconds_to_deadline(1), tag,
+ nullptr);
ev = grpc_completion_queue_next(cc, grpc_timeout_seconds_to_deadline(2),
nullptr);
@@ -63,7 +65,8 @@ static void test_alarm(void) {
grpc_event ev;
void* tag = create_test_tag();
grpc_alarm* alarm = grpc_alarm_create(nullptr);
- grpc_alarm_set(alarm, cc, grpc_timeout_seconds_to_deadline(2), tag, nullptr);
+ grpc_alarm_set(alarm, cc, grpc_timeout_seconds_to_deadline(2), tag,
+ nullptr);
grpc_alarm_cancel(alarm, nullptr);
ev = grpc_completion_queue_next(cc, grpc_timeout_seconds_to_deadline(1),
@@ -78,7 +81,8 @@ static void test_alarm(void) {
grpc_event ev;
void* tag = create_test_tag();
grpc_alarm* alarm = grpc_alarm_create(nullptr);
- grpc_alarm_set(alarm, cc, grpc_timeout_seconds_to_deadline(2), tag, nullptr);
+ grpc_alarm_set(alarm, cc, grpc_timeout_seconds_to_deadline(2), tag,
+ nullptr);
grpc_alarm_destroy(alarm, nullptr);
ev = grpc_completion_queue_next(cc, grpc_timeout_seconds_to_deadline(1),
diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc
index e70fe5fec1..c6e13d2386 100644
--- a/test/core/surface/completion_queue_test.cc
+++ b/test/core/surface/completion_queue_test.cc
@@ -44,8 +44,8 @@ static void shutdown_and_destroy(grpc_completion_queue* cc) {
break;
}
case GRPC_CQ_PLUCK: {
- ev = grpc_completion_queue_pluck(cc, create_test_tag(),
- gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_pluck(
+ cc, create_test_tag(), gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
break;
}
default: {
@@ -114,7 +114,8 @@ static void test_wait_empty(void) {
attr.cq_polling_type = polling_types[i];
cc = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&attr), &attr, nullptr);
- event = grpc_completion_queue_next(cc, gpr_now(GPR_CLOCK_REALTIME), nullptr);
+ event =
+ grpc_completion_queue_next(cc, gpr_now(GPR_CLOCK_REALTIME), nullptr);
GPR_ASSERT(event.type == GRPC_QUEUE_TIMEOUT);
shutdown_and_destroy(cc);
}
@@ -148,7 +149,8 @@ static void test_cq_end_op(void) {
grpc_cq_end_op(&exec_ctx, cc, tag, GRPC_ERROR_NONE,
do_nothing_end_completion, nullptr, &completion);
- ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
GPR_ASSERT(ev.tag == tag);
GPR_ASSERT(ev.success);
@@ -186,7 +188,8 @@ static void test_cq_tls_cache_full(void) {
grpc_cq_end_op(&exec_ctx, cc, tag, GRPC_ERROR_NONE,
do_nothing_end_completion, nullptr, &completion);
- ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.type == GRPC_QUEUE_TIMEOUT);
GPR_ASSERT(
@@ -194,7 +197,8 @@ static void test_cq_tls_cache_full(void) {
GPR_ASSERT(res_tag == tag);
GPR_ASSERT(ok);
- ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.type == GRPC_QUEUE_TIMEOUT);
shutdown_and_destroy(cc);
@@ -247,8 +251,8 @@ static void test_shutdown_then_next_polling(void) {
cc = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&attr), &attr, nullptr);
grpc_completion_queue_shutdown(cc);
- event =
- grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ event = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(event.type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cc);
}
@@ -313,8 +317,8 @@ static void test_pluck(void) {
}
for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) {
- ev = grpc_completion_queue_pluck(cc, tags[i],
- gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_pluck(
+ cc, tags[i], gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
GPR_ASSERT(ev.tag == tags[i]);
}
@@ -326,7 +330,8 @@ static void test_pluck(void) {
for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) {
ev = grpc_completion_queue_pluck(cc, tags[GPR_ARRAY_SIZE(tags) - i - 1],
- gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ gpr_inf_past(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(ev.tag == tags[GPR_ARRAY_SIZE(tags) - i - 1]);
}
@@ -351,8 +356,8 @@ static void test_pluck_after_shutdown(void) {
cc = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&attr), &attr, nullptr);
grpc_completion_queue_shutdown(cc);
- ev = grpc_completion_queue_pluck(cc, nullptr,
- gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_pluck(
+ cc, nullptr, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
GPR_ASSERT(ev.type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cc);
}
diff --git a/test/core/surface/completion_queue_threading_test.cc b/test/core/surface/completion_queue_threading_test.cc
index 457f96e95c..af54e00c4a 100644
--- a/test/core/surface/completion_queue_threading_test.cc
+++ b/test/core/surface/completion_queue_threading_test.cc
@@ -45,8 +45,8 @@ static void shutdown_and_destroy(grpc_completion_queue* cc) {
break;
}
case GRPC_CQ_PLUCK: {
- ev = grpc_completion_queue_pluck(cc, create_test_tag(),
- gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
+ ev = grpc_completion_queue_pluck(
+ cc, create_test_tag(), gpr_inf_past(GPR_CLOCK_REALTIME), nullptr);
break;
}
default: {
@@ -191,8 +191,8 @@ static void consumer_thread(void* arg) {
gpr_log(GPR_INFO, "consumer %d phase 2", opt->id);
for (;;) {
- ev = grpc_completion_queue_next(opt->cc,
- gpr_inf_future(GPR_CLOCK_MONOTONIC), nullptr);
+ ev = grpc_completion_queue_next(
+ opt->cc, gpr_inf_future(GPR_CLOCK_MONOTONIC), nullptr);
switch (ev.type) {
case GRPC_OP_COMPLETE:
GPR_ASSERT(ev.success);
diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc
index d1f5bf1072..8fa15ab331 100644
--- a/test/core/surface/concurrent_connectivity_test.cc
+++ b/test/core/surface/concurrent_connectivity_test.cc
@@ -60,14 +60,16 @@ static int detag(void* p) { return (int)(uintptr_t)p; }
void create_loop_destroy(void* addr) {
for (int i = 0; i < NUM_OUTER_LOOPS; ++i) {
grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
- grpc_channel* chan = grpc_insecure_channel_create((char*)addr, nullptr, nullptr);
+ grpc_channel* chan =
+ grpc_insecure_channel_create((char*)addr, nullptr, nullptr);
for (int j = 0; j < NUM_INNER_LOOPS; ++j) {
gpr_timespec later_time =
grpc_timeout_milliseconds_to_deadline(DELAY_MILLIS);
grpc_connectivity_state state =
grpc_channel_check_connectivity_state(chan, 1);
- grpc_channel_watch_connectivity_state(chan, state, later_time, cq, nullptr);
+ grpc_channel_watch_connectivity_state(chan, state, later_time, cq,
+ nullptr);
gpr_timespec poll_time =
grpc_timeout_milliseconds_to_deadline(POLL_MILLIS);
GPR_ASSERT(grpc_completion_queue_next(cq, poll_time, nullptr).type ==
@@ -239,7 +241,8 @@ int run_concurrent_connectivity_test() {
void watches_with_short_timeouts(void* addr) {
for (int i = 0; i < NUM_OUTER_LOOPS_SHORT_TIMEOUTS; ++i) {
grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
- grpc_channel* chan = grpc_insecure_channel_create((char*)addr, nullptr, nullptr);
+ grpc_channel* chan =
+ grpc_insecure_channel_create((char*)addr, nullptr, nullptr);
for (int j = 0; j < NUM_INNER_LOOPS_SHORT_TIMEOUTS; ++j) {
gpr_timespec later_time =
@@ -247,7 +250,8 @@ void watches_with_short_timeouts(void* addr) {
grpc_connectivity_state state =
grpc_channel_check_connectivity_state(chan, 0);
GPR_ASSERT(state == GRPC_CHANNEL_IDLE);
- grpc_channel_watch_connectivity_state(chan, state, later_time, cq, nullptr);
+ grpc_channel_watch_connectivity_state(chan, state, later_time, cq,
+ nullptr);
gpr_timespec poll_time =
grpc_timeout_milliseconds_to_deadline(POLL_MILLIS_SHORT_TIMEOUTS);
grpc_event ev = grpc_completion_queue_next(cq, poll_time, nullptr);
diff --git a/test/core/surface/lame_client_test.cc b/test/core/surface/lame_client_test.cc
index 71ec0cb6d6..f3df7f35a7 100644
--- a/test/core/surface/lame_client_test.cc
+++ b/test/core/surface/lame_client_test.cc
@@ -96,9 +96,10 @@ int main(int argc, char** argv) {
cq = grpc_completion_queue_create_for_next(nullptr);
grpc_slice host = grpc_slice_from_static_string("anywhere");
- call = grpc_channel_create_call(chan, nullptr, GRPC_PROPAGATE_DEFAULTS, cq,
- grpc_slice_from_static_string("/Foo"), &host,
- grpc_timeout_seconds_to_deadline(100), nullptr);
+ call =
+ grpc_channel_create_call(chan, nullptr, GRPC_PROPAGATE_DEFAULTS, cq,
+ grpc_slice_from_static_string("/Foo"), &host,
+ grpc_timeout_seconds_to_deadline(100), nullptr);
GPR_ASSERT(call);
cqv = cq_verifier_create(cq);
diff --git a/test/core/surface/num_external_connectivity_watchers_test.cc b/test/core/surface/num_external_connectivity_watchers_test.cc
index b08e28c0fc..f78d333673 100644
--- a/test/core/surface/num_external_connectivity_watchers_test.cc
+++ b/test/core/surface/num_external_connectivity_watchers_test.cc
@@ -50,8 +50,8 @@ static void channel_idle_start_watch(grpc_channel* channel,
static void channel_idle_poll_for_timeout(grpc_channel* channel,
grpc_completion_queue* cq) {
- grpc_event ev =
- grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
+ grpc_event ev = grpc_completion_queue_next(
+ cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
/* expect watch_connectivity_state to end with a timeout */
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
@@ -105,9 +105,9 @@ static void run_timeouts_test(const test_fixture* fixture) {
grpc_channel_destroy(channel);
grpc_completion_queue_shutdown(cq);
- GPR_ASSERT(
- grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr)
- .type == GRPC_QUEUE_SHUTDOWN);
+ GPR_ASSERT(grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME),
+ nullptr)
+ .type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cq);
grpc_shutdown();
@@ -141,16 +141,16 @@ static void run_channel_shutdown_before_timeout_test(
connect_deadline, cq, (void*)1);
grpc_channel_destroy(channel);
- grpc_event ev =
- grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
+ grpc_event ev = grpc_completion_queue_next(
+ cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
/* expect success with a state transition to CHANNEL_SHUTDOWN */
GPR_ASSERT(ev.success == true);
grpc_completion_queue_shutdown(cq);
- GPR_ASSERT(
- grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr)
- .type == GRPC_QUEUE_SHUTDOWN);
+ GPR_ASSERT(grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME),
+ nullptr)
+ .type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cq);
grpc_shutdown();
diff --git a/test/core/surface/secure_channel_create_test.cc b/test/core/surface/secure_channel_create_test.cc
index dcd1f2ef10..c31c61430c 100644
--- a/test/core/surface/secure_channel_create_test.cc
+++ b/test/core/surface/secure_channel_create_test.cc
@@ -51,7 +51,8 @@ void test_security_connector_already_in_arg(void) {
grpc_channel_args args;
args.num_args = 1;
args.args = &arg;
- grpc_channel* chan = grpc_secure_channel_create(nullptr, nullptr, &args, nullptr);
+ grpc_channel* chan =
+ grpc_secure_channel_create(nullptr, nullptr, &args, nullptr);
grpc_channel_element* elem =
grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0);
GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client"));
@@ -61,7 +62,8 @@ void test_security_connector_already_in_arg(void) {
}
void test_null_creds(void) {
- grpc_channel* chan = grpc_secure_channel_create(nullptr, nullptr, nullptr, nullptr);
+ grpc_channel* chan =
+ grpc_secure_channel_create(nullptr, nullptr, nullptr, nullptr);
grpc_channel_element* elem =
grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0);
GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client"));
diff --git a/test/core/surface/sequential_connectivity_test.cc b/test/core/surface/sequential_connectivity_test.cc
index 5bf3b12c73..015db92cb0 100644
--- a/test/core/surface/sequential_connectivity_test.cc
+++ b/test/core/surface/sequential_connectivity_test.cc
@@ -104,9 +104,9 @@ static void run_test(const test_fixture* fixture) {
gpr_inf_future(GPR_CLOCK_REALTIME), nullptr)
.type != GRPC_QUEUE_SHUTDOWN)
;
- while (
- grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr)
- .type != GRPC_QUEUE_SHUTDOWN)
+ while (grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME),
+ nullptr)
+ .type != GRPC_QUEUE_SHUTDOWN)
;
for (size_t i = 0; i < NUM_CONNECTIONS; i++) {
@@ -138,8 +138,8 @@ static const test_fixture insecure_test = {
static void secure_test_add_port(grpc_server* server, const char* addr) {
grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key,
test_server1_cert};
- grpc_server_credentials* ssl_creds =
- grpc_ssl_server_credentials_create(nullptr, &pem_cert_key_pair, 1, 0, nullptr);
+ grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create(
+ nullptr, &pem_cert_key_pair, 1, 0, nullptr);
grpc_server_add_secure_http2_port(server, addr, ssl_creds);
grpc_server_credentials_release(ssl_creds);
}
diff --git a/test/core/surface/server_test.cc b/test/core/surface/server_test.cc
index 1998cab3e3..969b8cb11b 100644
--- a/test/core/surface/server_test.cc
+++ b/test/core/surface/server_test.cc
@@ -31,8 +31,8 @@ void test_register_method_fail(void) {
grpc_server* server = grpc_server_create(nullptr, nullptr);
void* method;
void* method_old;
- method =
- grpc_server_register_method(server, nullptr, nullptr, GRPC_SRM_PAYLOAD_NONE, 0);
+ method = grpc_server_register_method(server, nullptr, nullptr,
+ GRPC_SRM_PAYLOAD_NONE, 0);
GPR_ASSERT(method == nullptr);
method_old =
grpc_server_register_method(server, "m", "h", GRPC_SRM_PAYLOAD_NONE, 0);
@@ -58,10 +58,12 @@ void test_request_call_on_no_server_cq(void) {
grpc_completion_queue* cc = grpc_completion_queue_create_for_next(nullptr);
grpc_server* server = grpc_server_create(nullptr, nullptr);
GPR_ASSERT(GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE ==
- grpc_server_request_call(server, nullptr, nullptr, nullptr, cc, cc, nullptr));
+ grpc_server_request_call(server, nullptr, nullptr, nullptr, cc, cc,
+ nullptr));
GPR_ASSERT(GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE ==
- grpc_server_request_registered_call(server, nullptr, nullptr, nullptr, nullptr,
- nullptr, cc, cc, nullptr));
+ grpc_server_request_registered_call(server, nullptr, nullptr,
+ nullptr, nullptr, nullptr, cc,
+ cc, nullptr));
grpc_completion_queue_destroy(cc);
grpc_server_destroy(server);
}
diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc
index 03367d85e5..8939c0434b 100644
--- a/test/core/tsi/ssl_transport_security_test.cc
+++ b/test/core/tsi/ssl_transport_security_test.cc
@@ -125,8 +125,9 @@ static void ssl_test_setup_handshakers(tsi_test_fixture* fixture) {
key_cert_lib->use_bad_server_cert
? key_cert_lib->bad_server_num_key_cert_pairs
: key_cert_lib->server_num_key_cert_pairs,
- key_cert_lib->root_cert, ssl_fixture->force_client_auth, nullptr,
- (const char**)server_alpn_protocols, num_server_alpn_protocols,
+ key_cert_lib->root_cert, ssl_fixture->force_client_auth,
+ nullptr, (const char**)server_alpn_protocols,
+ num_server_alpn_protocols,
&ssl_fixture->server_handshaker_factory) == TSI_OK);
/* Create server and client handshakers. */
tsi_handshaker* client_handshaker = nullptr;
@@ -565,8 +566,8 @@ void test_tsi_ssl_client_handshaker_factory_refcounting() {
tsi_ssl_client_handshaker_factory* client_handshaker_factory;
GPR_ASSERT(tsi_create_ssl_client_handshaker_factory(
- nullptr, cert_chain, nullptr, nullptr, 0, &client_handshaker_factory) ==
- TSI_OK);
+ nullptr, cert_chain, nullptr, nullptr, 0,
+ &client_handshaker_factory) == TSI_OK);
handshaker_factory_destructor_called = false;
original_vtable = tsi_ssl_handshaker_factory_swap_vtable(
@@ -644,8 +645,8 @@ void test_tsi_ssl_client_handshaker_factory_bad_params() {
tsi_ssl_client_handshaker_factory* client_handshaker_factory;
GPR_ASSERT(tsi_create_ssl_client_handshaker_factory(
- nullptr, cert_chain, nullptr, nullptr, 0, &client_handshaker_factory) ==
- TSI_INVALID_ARGUMENT);
+ nullptr, cert_chain, nullptr, nullptr, 0,
+ &client_handshaker_factory) == TSI_INVALID_ARGUMENT);
tsi_ssl_client_handshaker_factory_unref(client_handshaker_factory);
}
diff --git a/test/core/tsi/transport_security_test.cc b/test/core/tsi/transport_security_test.cc
index 8dfe72e03b..c788ad96ad 100644
--- a/test/core/tsi/transport_security_test.cc
+++ b/test/core/tsi/transport_security_test.cc
@@ -90,7 +90,8 @@ const cert_name_test_entry cert_name_test_entries[] = {
/* IDN tests */
{1, "xn--poema-9qae5a.com.br", "xn--poema-9qae5a.com.br", nullptr, nullptr},
- {1, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br", nullptr, nullptr},
+ {1, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br", nullptr,
+ nullptr},
{0, "xn--poema-9qae5a.com.br", "",
"*.xn--poema-9qae5a.com.br,"
"xn--poema-*.com.br,"
@@ -129,8 +130,10 @@ const cert_name_test_entry cert_name_test_entries[] = {
{0, "foo", "*", nullptr, nullptr},
/* IDN variants of wildcards and registry controlled domains. */
- {1, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br", nullptr, nullptr},
- {1, "test.example.xn--mgbaam7a8h", "*.example.xn--mgbaam7a8h", nullptr, nullptr},
+ {1, "www.xn--poema-9qae5a.com.br", "*.xn--poema-9qae5a.com.br", nullptr,
+ nullptr},
+ {1, "test.example.xn--mgbaam7a8h", "*.example.xn--mgbaam7a8h", nullptr,
+ nullptr},
/*
{0, "xn--poema-9qae5a.com.br", "*.com.br", NULL},
*/
@@ -177,7 +180,8 @@ const cert_name_test_entry cert_name_test_entries[] = {
{1, "173.194.195.139", "foo.example.com", nullptr, "173.194.195.139"},
{0, "173.194.195.139", "foo.example.com", nullptr, "8.8.8.8"},
{0, "173.194.195.139", "foo.example.com", nullptr, "8.8.8.8,8.8.4.4"},
- {1, "173.194.195.139", "foo.example.com", nullptr, "8.8.8.8,173.194.195.139"},
+ {1, "173.194.195.139", "foo.example.com", nullptr,
+ "8.8.8.8,173.194.195.139"},
{0, "173.194.195.139", "foo.example.com", nullptr, "173.194.195.13"},
{0, "2001:db8:a0b:12f0::1", "foo.example.com", nullptr, "173.194.195.13"},
{1, "2001:db8:a0b:12f0::1", "foo.example.com", nullptr,
@@ -344,25 +348,26 @@ static void test_result_strings(void) {
}
static void test_protector_invalid_args(void) {
- GPR_ASSERT(tsi_frame_protector_protect(nullptr, nullptr, nullptr, nullptr, nullptr) ==
- TSI_INVALID_ARGUMENT);
- GPR_ASSERT(tsi_frame_protector_protect_flush(nullptr, nullptr, nullptr, nullptr) ==
- TSI_INVALID_ARGUMENT);
- GPR_ASSERT(tsi_frame_protector_unprotect(nullptr, nullptr, nullptr, nullptr, nullptr) ==
- TSI_INVALID_ARGUMENT);
+ GPR_ASSERT(tsi_frame_protector_protect(nullptr, nullptr, nullptr, nullptr,
+ nullptr) == TSI_INVALID_ARGUMENT);
+ GPR_ASSERT(tsi_frame_protector_protect_flush(
+ nullptr, nullptr, nullptr, nullptr) == TSI_INVALID_ARGUMENT);
+ GPR_ASSERT(tsi_frame_protector_unprotect(nullptr, nullptr, nullptr, nullptr,
+ nullptr) == TSI_INVALID_ARGUMENT);
}
static void test_handshaker_invalid_args(void) {
GPR_ASSERT(tsi_handshaker_get_result(nullptr) == TSI_INVALID_ARGUMENT);
- GPR_ASSERT(tsi_handshaker_extract_peer(nullptr, nullptr) == TSI_INVALID_ARGUMENT);
- GPR_ASSERT(tsi_handshaker_create_frame_protector(nullptr, nullptr, nullptr) ==
- TSI_INVALID_ARGUMENT);
- GPR_ASSERT(tsi_handshaker_process_bytes_from_peer(nullptr, nullptr, nullptr) ==
+ GPR_ASSERT(tsi_handshaker_extract_peer(nullptr, nullptr) ==
TSI_INVALID_ARGUMENT);
- GPR_ASSERT(tsi_handshaker_get_bytes_to_send_to_peer(nullptr, nullptr, nullptr) ==
- TSI_INVALID_ARGUMENT);
- GPR_ASSERT(tsi_handshaker_next(nullptr, nullptr, 0, nullptr, nullptr, nullptr, nullptr, nullptr) ==
+ GPR_ASSERT(tsi_handshaker_create_frame_protector(nullptr, nullptr, nullptr) ==
TSI_INVALID_ARGUMENT);
+ GPR_ASSERT(tsi_handshaker_process_bytes_from_peer(
+ nullptr, nullptr, nullptr) == TSI_INVALID_ARGUMENT);
+ GPR_ASSERT(tsi_handshaker_get_bytes_to_send_to_peer(
+ nullptr, nullptr, nullptr) == TSI_INVALID_ARGUMENT);
+ GPR_ASSERT(tsi_handshaker_next(nullptr, nullptr, 0, nullptr, nullptr, nullptr,
+ nullptr, nullptr) == TSI_INVALID_ARGUMENT);
}
static void test_handshaker_invalid_state(void) {
diff --git a/test/core/tsi/transport_security_test_lib.cc b/test/core/tsi/transport_security_test_lib.cc
index 47a71717a6..3537366de9 100644
--- a/test/core/tsi/transport_security_test_lib.cc
+++ b/test/core/tsi/transport_security_test_lib.cc
@@ -110,7 +110,8 @@ static void check_handshake_results(tsi_test_fixture* fixture) {
fixture->vtable->check_handshaker_peers(fixture);
/* Check unused bytes. */
if (fixture->test_unused_bytes) {
- if (fixture->server_result != nullptr && fixture->client_result != nullptr) {
+ if (fixture->server_result != nullptr &&
+ fixture->client_result != nullptr) {
check_unused_bytes(fixture);
}
fixture->bytes_written_to_server_channel = 0;
@@ -145,7 +146,8 @@ static void maybe_append_unused_bytes(handshaker_args* args) {
args->appended_unused_bytes = true;
send_bytes_to_peer(fixture, (const unsigned char*)TSI_TEST_UNUSED_BYTES,
strlen(TSI_TEST_UNUSED_BYTES), args->is_client);
- if (fixture->client_result != nullptr && fixture->server_result == nullptr) {
+ if (fixture->client_result != nullptr &&
+ fixture->server_result == nullptr) {
fixture->has_client_finished_first = true;
}
}
@@ -399,7 +401,8 @@ void tsi_test_do_handshake(tsi_test_fixture* fixture) {
break;
}
GPR_ASSERT(client_args->transferred_data || server_args->transferred_data);
- } while (fixture->client_result == nullptr || fixture->server_result == nullptr);
+ } while (fixture->client_result == nullptr ||
+ fixture->server_result == nullptr);
/* Verify handshake results. */
check_handshake_results(fixture);
/* Cleanup. */
diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc
index aeaa38ac65..9ebb52d83e 100644
--- a/test/core/util/test_config.cc
+++ b/test/core/util/test_config.cc
@@ -203,7 +203,7 @@ static void install_crash_handler() {
#define SIGNAL_NAMES_LENGTH 32
static const char* const signal_names[] = {
- nullptr, "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP",
+ nullptr, "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP",
"SIGABRT", "SIGBUS", "SIGFPE", "SIGKILL", "SIGUSR1", "SIGSEGV",
"SIGUSR2", "SIGPIPE", "SIGALRM", "SIGTERM", "SIGSTKFLT", "SIGCHLD",
"SIGCONT", "SIGSTOP", "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG",
diff --git a/test/core/util/trickle_endpoint.cc b/test/core/util/trickle_endpoint.cc
index 63d9728600..4544fb7f49 100644
--- a/test/core/util/trickle_endpoint.cc
+++ b/test/core/util/trickle_endpoint.cc
@@ -53,8 +53,9 @@ static void te_read(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep,
static void maybe_call_write_cb_locked(grpc_exec_ctx* exec_ctx,
trickle_endpoint* te) {
- if (te->write_cb != nullptr && (te->error != GRPC_ERROR_NONE ||
- te->write_buffer.length <= WRITE_BUFFER_SIZE)) {
+ if (te->write_cb != nullptr &&
+ (te->error != GRPC_ERROR_NONE ||
+ te->write_buffer.length <= WRITE_BUFFER_SIZE)) {
GRPC_CLOSURE_SCHED(exec_ctx, te->write_cb, GRPC_ERROR_REF(te->error));
te->write_cb = nullptr;
}
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc
index 894143cbc8..f8bb12fde1 100644
--- a/test/cpp/end2end/client_lb_end2end_test.cc
+++ b/test/cpp/end2end/client_lb_end2end_test.cc
@@ -113,7 +113,8 @@ class ClientLbEnd2endTest : public ::testing::Test {
void SetNextResolution(const std::vector<int>& ports) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_lb_addresses* addresses = grpc_lb_addresses_create(ports.size(), nullptr);
+ grpc_lb_addresses* addresses =
+ grpc_lb_addresses_create(ports.size(), nullptr);
for (size_t i = 0; i < ports.size(); ++i) {
char* lb_uri_str;
gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", ports[i]);
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc
index 1cc529991e..ca846c72fd 100644
--- a/test/cpp/grpclb/grpclb_test.cc
+++ b/test/cpp/grpclb/grpclb_test.cc
@@ -264,7 +264,8 @@ static void start_lb_server(server_fixture* sf, int* ports, size_t nports,
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(203), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(203), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(203), 1);
cq_verify(cqv);
@@ -328,8 +329,8 @@ static void start_backend_server(server_fixture* sf) {
tag(100));
GPR_ASSERT(GRPC_CALL_OK == error);
gpr_log(GPR_INFO, "Server[%s] up", sf->servers_hostport);
- ev = grpc_completion_queue_next(sf->cq,
- grpc_timeout_seconds_to_deadline(60), nullptr);
+ ev = grpc_completion_queue_next(
+ sf->cq, grpc_timeout_seconds_to_deadline(60), nullptr);
if (!ev.success) {
gpr_log(GPR_INFO, "Server[%s] being torn down", sf->servers_hostport);
cq_verifier_destroy(cqv);
@@ -358,7 +359,8 @@ static void start_backend_server(server_fixture* sf) {
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(101), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(101), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
gpr_log(GPR_INFO, "Server[%s] after tag 101", sf->servers_hostport);
@@ -371,7 +373,8 @@ static void start_backend_server(server_fixture* sf) {
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
ev = grpc_completion_queue_next(
sf->cq, grpc_timeout_seconds_to_deadline(3), nullptr);
@@ -400,8 +403,8 @@ static void start_backend_server(server_fixture* sf) {
op->flags = 0;
op->reserved = nullptr;
op++;
- error =
- grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), nullptr);
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103),
+ nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
ev = grpc_completion_queue_next(
sf->cq, grpc_timeout_seconds_to_deadline(3), nullptr);
@@ -434,7 +437,8 @@ static void start_backend_server(server_fixture* sf) {
op->flags = 0;
op->reserved = nullptr;
op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), nullptr);
+ error =
+ grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), nullptr);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
@@ -588,8 +592,8 @@ static void setup_client(const server_fixture* lb_server,
grpc_fake_transport_expected_targets_arg(expected_target_names),
grpc_fake_resolver_response_generator_arg(response_generator)};
- grpc_channel_args* args =
- grpc_channel_args_copy_and_add(nullptr, new_args, GPR_ARRAY_SIZE(new_args));
+ grpc_channel_args* args = grpc_channel_args_copy_and_add(
+ nullptr, new_args, GPR_ARRAY_SIZE(new_args));
gpr_free(expected_target_names);
cf->cq = grpc_completion_queue_create_for_next(nullptr);
diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc
index 8102470d54..a45c577320 100644
--- a/test/cpp/microbenchmarks/bm_call_create.cc
+++ b/test/cpp/microbenchmarks/bm_call_create.cc
@@ -107,8 +107,8 @@ static void BM_CallCreateDestroy(benchmark::State& state) {
Fixture fixture;
grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
- void* method_hdl =
- grpc_channel_register_call(fixture.channel(), "/foo/bar", nullptr, nullptr);
+ void* method_hdl = grpc_channel_register_call(fixture.channel(), "/foo/bar",
+ nullptr, nullptr);
while (state.KeepRunning()) {
grpc_call_unref(grpc_channel_create_registered_call(
fixture.channel(), nullptr, GRPC_PROPAGATE_DEFAULTS, cq, method_hdl,
@@ -708,7 +708,8 @@ class IsolatedCallFixture : public TrackCounters {
grpc_channel_stack_builder_set_name(builder, "dummy");
grpc_channel_stack_builder_set_target(builder, "dummy_target");
GPR_ASSERT(grpc_channel_stack_builder_append_filter(
- builder, &isolated_call_filter::isolated_call_filter, nullptr, nullptr));
+ builder, &isolated_call_filter::isolated_call_filter, nullptr,
+ nullptr));
{
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
channel_ = grpc_channel_create_with_builder(&exec_ctx, builder,
@@ -735,8 +736,8 @@ class IsolatedCallFixture : public TrackCounters {
static void BM_IsolatedCall_NoOp(benchmark::State& state) {
IsolatedCallFixture fixture;
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
- void* method_hdl =
- grpc_channel_register_call(fixture.channel(), "/foo/bar", nullptr, nullptr);
+ void* method_hdl = grpc_channel_register_call(fixture.channel(), "/foo/bar",
+ nullptr, nullptr);
while (state.KeepRunning()) {
GPR_TIMER_SCOPE("BenchmarkCycle", 0);
grpc_call_unref(grpc_channel_create_registered_call(
@@ -750,8 +751,8 @@ BENCHMARK(BM_IsolatedCall_NoOp);
static void BM_IsolatedCall_Unary(benchmark::State& state) {
IsolatedCallFixture fixture;
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
- void* method_hdl =
- grpc_channel_register_call(fixture.channel(), "/foo/bar", nullptr, nullptr);
+ void* method_hdl = grpc_channel_register_call(fixture.channel(), "/foo/bar",
+ nullptr, nullptr);
grpc_slice slice = grpc_slice_from_static_string("hello world");
grpc_byte_buffer* send_message = grpc_raw_byte_buffer_create(&slice, 1);
grpc_byte_buffer* recv_message = nullptr;
@@ -796,8 +797,8 @@ BENCHMARK(BM_IsolatedCall_Unary);
static void BM_IsolatedCall_StreamingSend(benchmark::State& state) {
IsolatedCallFixture fixture;
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
- void* method_hdl =
- grpc_channel_register_call(fixture.channel(), "/foo/bar", nullptr, nullptr);
+ void* method_hdl = grpc_channel_register_call(fixture.channel(), "/foo/bar",
+ nullptr, nullptr);
grpc_slice slice = grpc_slice_from_static_string("hello world");
grpc_byte_buffer* send_message = grpc_raw_byte_buffer_create(&slice, 1);
grpc_metadata_array recv_initial_metadata;
diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc
index e603b70889..2434d4e84e 100644
--- a/test/cpp/microbenchmarks/bm_closure.cc
+++ b/test/cpp/microbenchmarks/bm_closure.cc
@@ -305,8 +305,10 @@ static void BM_ClosureSched2OnTwoCombiners(benchmark::State& state) {
grpc_combiner* combiner2 = grpc_combiner_create();
grpc_closure c1;
grpc_closure c2;
- GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_combiner_scheduler(combiner1));
- GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner2));
+ GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr,
+ grpc_combiner_scheduler(combiner1));
+ GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr,
+ grpc_combiner_scheduler(combiner2));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (state.KeepRunning()) {
GRPC_CLOSURE_SCHED(&exec_ctx, &c1, GRPC_ERROR_NONE);
@@ -328,10 +330,14 @@ static void BM_ClosureSched4OnTwoCombiners(benchmark::State& state) {
grpc_closure c2;
grpc_closure c3;
grpc_closure c4;
- GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_combiner_scheduler(combiner1));
- GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner2));
- GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr, grpc_combiner_scheduler(combiner1));
- GRPC_CLOSURE_INIT(&c4, DoNothing, nullptr, grpc_combiner_scheduler(combiner2));
+ GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr,
+ grpc_combiner_scheduler(combiner1));
+ GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr,
+ grpc_combiner_scheduler(combiner2));
+ GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr,
+ grpc_combiner_scheduler(combiner1));
+ GRPC_CLOSURE_INIT(&c4, DoNothing, nullptr,
+ grpc_combiner_scheduler(combiner2));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (state.KeepRunning()) {
GRPC_CLOSURE_SCHED(&exec_ctx, &c1, GRPC_ERROR_NONE);
diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc
index 343681bb9b..f0dede7333 100644
--- a/test/cpp/microbenchmarks/bm_cq.cc
+++ b/test/cpp/microbenchmarks/bm_cq.cc
@@ -59,7 +59,8 @@ static void BM_CreateDestroyCore(benchmark::State& state) {
while (state.KeepRunning()) {
// TODO: sreek Templatize this benchmark and pass completion type and
// polling type as parameters
- grpc_completion_queue_destroy(grpc_completion_queue_create_for_next(nullptr));
+ grpc_completion_queue_destroy(
+ grpc_completion_queue_create_for_next(nullptr));
}
track_counters.Finish(state);
}
diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc
index fa9af0ac5a..02a93e90cc 100644
--- a/test/cpp/microbenchmarks/bm_error.cc
+++ b/test/cpp/microbenchmarks/bm_error.cc
@@ -278,8 +278,8 @@ static void BM_ErrorHttpError(benchmark::State& state) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (state.KeepRunning()) {
grpc_http2_error_code error;
- grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(), nullptr,
- nullptr, &error);
+ grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(),
+ nullptr, nullptr, &error);
}
grpc_exec_ctx_finish(&exec_ctx);
track_counters.Finish(state);
diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc
index 0a04dde15f..4da79693f1 100644
--- a/test/cpp/microbenchmarks/bm_pollset.cc
+++ b/test/cpp/microbenchmarks/bm_pollset.cc
@@ -145,7 +145,8 @@ static void BM_PollAddFd(benchmark::State& state) {
grpc_pollset_add_fd(&exec_ctx, ps, fd);
grpc_exec_ctx_flush(&exec_ctx);
}
- grpc_fd_orphan(&exec_ctx, fd, nullptr, nullptr, false /* already_closed */, "xxx");
+ grpc_fd_orphan(&exec_ctx, fd, nullptr, nullptr, false /* already_closed */,
+ "xxx");
grpc_closure shutdown_ps_closure;
GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps,
grpc_schedule_on_exec_ctx);
@@ -242,8 +243,8 @@ static void BM_SingleThreadPollOneFd(benchmark::State& state) {
GRPC_ERROR_UNREF(
grpc_pollset_work(&exec_ctx, ps, nullptr, GRPC_MILLIS_INF_FUTURE));
}
- grpc_fd_orphan(&exec_ctx, wakeup, nullptr, nullptr, false /* already_closed */,
- "done");
+ grpc_fd_orphan(&exec_ctx, wakeup, nullptr, nullptr,
+ false /* already_closed */, "done");
wakeup_fd.read_fd = 0;
grpc_closure shutdown_ps_closure;
GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps,
diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h
index 323ca1e5d7..7f1aa48b56 100644
--- a/test/cpp/microbenchmarks/fullstack_fixtures.h
+++ b/test/cpp/microbenchmarks/fullstack_fixtures.h
@@ -186,7 +186,8 @@ class EndpointPairFixture : public BaseFixture {
grpc_server_setup_transport(&exec_ctx, server_->c_server(),
server_transport_, nullptr, server_args);
- grpc_chttp2_transport_start_reading(&exec_ctx, server_transport_, nullptr);
+ grpc_chttp2_transport_start_reading(&exec_ctx, server_transport_,
+ nullptr);
}
/* create channel */
@@ -202,7 +203,8 @@ class EndpointPairFixture : public BaseFixture {
grpc_channel* channel =
grpc_channel_create(&exec_ctx, "target", &c_args,
GRPC_CLIENT_DIRECT_CHANNEL, client_transport_);
- grpc_chttp2_transport_start_reading(&exec_ctx, client_transport_, nullptr);
+ grpc_chttp2_transport_start_reading(&exec_ctx, client_transport_,
+ nullptr);
channel_ = CreateChannelInternal("", channel);
}
diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc
index 9c1b4c7b73..6f1f0c44b9 100644
--- a/test/cpp/naming/resolver_component_test.cc
+++ b/test/cpp/naming/resolver_component_test.cc
@@ -167,7 +167,8 @@ void ArgsFinish(grpc_exec_ctx* exec_ctx, ArgsStruct* args) {
grpc_pollset_set_del_pollset(exec_ctx, args->pollset_set, args->pollset);
grpc_pollset_set_destroy(exec_ctx, args->pollset_set);
grpc_closure DoNothing_cb;
- GRPC_CLOSURE_INIT(&DoNothing_cb, DoNothing, nullptr, grpc_schedule_on_exec_ctx);
+ GRPC_CLOSURE_INIT(&DoNothing_cb, DoNothing, nullptr,
+ grpc_schedule_on_exec_ctx);
grpc_pollset_shutdown(exec_ctx, args->pollset, &DoNothing_cb);
// exec_ctx needs to be flushed before calling grpc_pollset_destroy()
grpc_channel_args_destroy(exec_ctx, args->channel_args);
diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc
index a8677eeba2..1c07b2a8ef 100644
--- a/test/cpp/util/grpc_tool_test.cc
+++ b/test/cpp/util/grpc_tool_test.cc
@@ -422,8 +422,8 @@ TEST_F(GrpcToolTest, CallCommandBatch) {
// Expected output: "message: "Hello0"\nmessage: "Hello1"\nmessage:
// "Hello2"\n"
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
- "message: \"Hello0\"\nmessage: "
- "\"Hello1\"\nmessage: \"Hello2\"\n"));
+ "message: \"Hello0\"\nmessage: "
+ "\"Hello1\"\nmessage: \"Hello2\"\n"));
std::cin.rdbuf(orig);
ShutdownServer();
}
@@ -449,7 +449,7 @@ TEST_F(GrpcToolTest, CallCommandBatchWithBadRequest) {
// Expected output: "message: "Hello0"\nmessage: "Hello2"\n"
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
- "message: \"Hello0\"\nmessage: \"Hello2\"\n"));
+ "message: \"Hello0\"\nmessage: \"Hello2\"\n"));
std::cin.rdbuf(orig);
ShutdownServer();
}
@@ -474,7 +474,7 @@ TEST_F(GrpcToolTest, CallCommandRequestStream) {
// Expected output: "message: \"Hello0Hello1Hello2\""
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
- "message: \"Hello0Hello1Hello2\""));
+ "message: \"Hello0Hello1Hello2\""));
std::cin.rdbuf(orig);
ShutdownServer();
}
@@ -522,7 +522,7 @@ TEST_F(GrpcToolTest, CallCommandResponseStream) {
grpc::string expected_response_text =
"message: \"Hello" + grpc::to_string(i) + "\"\n";
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
- expected_response_text.c_str()));
+ expected_response_text.c_str()));
}
ShutdownServer();
@@ -548,8 +548,8 @@ TEST_F(GrpcToolTest, CallCommandBidiStream) {
// Expected output: "message: \"Hello0\"\nmessage: \"Hello1\"\nmessage:
// \"Hello2\"\n\n"
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
- "message: \"Hello0\"\nmessage: "
- "\"Hello1\"\nmessage: \"Hello2\"\n"));
+ "message: \"Hello0\"\nmessage: "
+ "\"Hello1\"\nmessage: \"Hello2\"\n"));
std::cin.rdbuf(orig);
ShutdownServer();
}
@@ -574,7 +574,7 @@ TEST_F(GrpcToolTest, CallCommandBidiStreamWithBadRequest) {
// Expected output: "message: \"Hello0\"\nmessage: \"Hello1\"\nmessage:
// \"Hello2\"\n\n"
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
- "message: \"Hello0\"\nmessage: \"Hello2\"\n"));
+ "message: \"Hello0\"\nmessage: \"Hello2\"\n"));
std::cin.rdbuf(orig);
ShutdownServer();