aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
Diffstat (limited to 'test/core')
-rw-r--r--test/core/bad_client/bad_client.c5
-rw-r--r--test/core/bad_client/tests/connection_prefix.c6
-rw-r--r--test/core/bad_client/tests/initial_settings_frame.c6
-rw-r--r--test/core/client_config/uri_parser_test.c3
-rw-r--r--test/core/compression/compression_test.c77
-rw-r--r--test/core/compression/message_compress_test.c3
-rw-r--r--test/core/end2end/cq_verifier.c2
-rw-r--r--test/core/end2end/cq_verifier.h5
-rw-r--r--test/core/end2end/data/ssl_test_data.h2
-rw-r--r--test/core/end2end/dualstack_socket_test.c5
-rw-r--r--test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c3
-rw-r--r--test/core/end2end/fixtures/proxy.c23
-rw-r--r--test/core/end2end/multiple_server_queues_test.c4
-rw-r--r--test/core/end2end/no_server_test.c5
-rw-r--r--test/core/end2end/tests/bad_hostname.c5
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c5
-rw-r--r--test/core/end2end/tests/cancel_after_accept_and_writes_closed.c5
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.c5
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.c5
-rw-r--r--test/core/end2end/tests/cancel_in_a_vacuum.c5
-rw-r--r--test/core/end2end/tests/cancel_test_helpers.h2
-rw-r--r--test/core/end2end/tests/census_simple_request.c11
-rw-r--r--test/core/end2end/tests/channel_connectivity.c40
-rw-r--r--test/core/end2end/tests/default_host.c17
-rw-r--r--test/core/end2end/tests/disappearing_server.c6
-rw-r--r--test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c6
-rw-r--r--test/core/end2end/tests/empty_batch.c5
-rw-r--r--test/core/end2end/tests/graceful_server_shutdown.c6
-rw-r--r--test/core/end2end/tests/invoke_large_request.c11
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c11
-rw-r--r--test/core/end2end/tests/max_message_length.c11
-rw-r--r--test/core/end2end/tests/no_op.c5
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.c11
-rw-r--r--test/core/end2end/tests/registered_call.c21
-rw-r--r--test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c11
-rw-r--r--test/core/end2end/tests/request_response_with_metadata_and_payload.c21
-rw-r--r--test/core/end2end/tests/request_response_with_payload.c11
-rw-r--r--test/core/end2end/tests/request_response_with_payload_and_call_creds.c13
-rw-r--r--test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c26
-rw-r--r--test/core/end2end/tests/request_with_compressed_payload.c26
-rw-r--r--test/core/end2end/tests/request_with_flags.c5
-rw-r--r--test/core/end2end/tests/request_with_large_metadata.c11
-rw-r--r--test/core/end2end/tests/request_with_payload.c5
-rw-r--r--test/core/end2end/tests/server_finishes_request.c11
-rw-r--r--test/core/end2end/tests/simple_delayed_request.c11
-rw-r--r--test/core/end2end/tests/simple_request.c11
-rw-r--r--test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c11
-rw-r--r--test/core/fling/fling_test.c10
-rw-r--r--test/core/fling/server.c3
-rw-r--r--test/core/httpcli/format_request_test.c3
-rw-r--r--test/core/json/json_test.c2
-rw-r--r--test/core/security/auth_context_test.c1
-rw-r--r--test/core/security/json_token_test.c12
-rw-r--r--test/core/security/jwt_verifier_test.c38
-rw-r--r--test/core/security/print_google_default_creds_token.c3
-rw-r--r--test/core/security/security_connector_test.c9
-rw-r--r--test/core/security/verify_jwt.c1
-rw-r--r--test/core/statistics/census_log_tests.h2
-rw-r--r--test/core/statistics/hash_table_test.c14
-rw-r--r--test/core/support/cmdline_test.c5
-rw-r--r--test/core/support/string_test.c4
-rw-r--r--test/core/support/thd_test.c2
-rw-r--r--test/core/surface/completion_queue_test.c8
-rw-r--r--test/core/surface/lame_client_test.c6
-rw-r--r--test/core/transport/chttp2/stream_map_test.c6
-rw-r--r--test/core/util/grpc_profiler.h2
-rw-r--r--test/core/util/parse_hexstring.h2
-rw-r--r--test/core/util/port.h2
-rw-r--r--test/core/util/port_windows.c13
-rw-r--r--test/core/util/slice_splitter.h2
-rw-r--r--test/core/util/test_config.c6
71 files changed, 370 insertions, 301 deletions
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c
index f7399770dd..24bf5d3625 100644
--- a/test/core/bad_client/bad_client.c
+++ b/test/core/bad_client/bad_client.c
@@ -150,9 +150,8 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
grpc_endpoint_destroy(sfd.client);
}
grpc_server_shutdown_and_notify(a.server, a.cq, NULL);
- GPR_ASSERT(grpc_completion_queue_pluck(a.cq, NULL,
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ a.cq, NULL, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(a.server);
grpc_completion_queue_destroy(a.cq);
diff --git a/test/core/bad_client/tests/connection_prefix.c b/test/core/bad_client/tests/connection_prefix.c
index de62e923f0..ec85211605 100644
--- a/test/core/bad_client/tests/connection_prefix.c
+++ b/test/core/bad_client/tests/connection_prefix.c
@@ -36,9 +36,9 @@
static void verifier(grpc_server *server, grpc_completion_queue *cq) {
while (grpc_server_has_open_connections(server)) {
- GPR_ASSERT(
- grpc_completion_queue_next(cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20),
- NULL).type == GRPC_QUEUE_TIMEOUT);
+ GPR_ASSERT(grpc_completion_queue_next(
+ cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL)
+ .type == GRPC_QUEUE_TIMEOUT);
}
}
diff --git a/test/core/bad_client/tests/initial_settings_frame.c b/test/core/bad_client/tests/initial_settings_frame.c
index 28e9a39dff..261fecdaf2 100644
--- a/test/core/bad_client/tests/initial_settings_frame.c
+++ b/test/core/bad_client/tests/initial_settings_frame.c
@@ -38,9 +38,9 @@
static void verifier(grpc_server *server, grpc_completion_queue *cq) {
while (grpc_server_has_open_connections(server)) {
- GPR_ASSERT(
- grpc_completion_queue_next(cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20),
- NULL).type == GRPC_QUEUE_TIMEOUT);
+ GPR_ASSERT(grpc_completion_queue_next(
+ cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL)
+ .type == GRPC_QUEUE_TIMEOUT);
}
}
diff --git a/test/core/client_config/uri_parser_test.c b/test/core/client_config/uri_parser_test.c
index 3451ca1e8c..d324029c7e 100644
--- a/test/core/client_config/uri_parser_test.c
+++ b/test/core/client_config/uri_parser_test.c
@@ -60,7 +60,8 @@ int main(int argc, char **argv) {
test_succeeds("http://www.google.com:90", "http", "www.google.com:90", "");
test_succeeds("a192.4-df:foo.coom", "a192.4-df", "", "foo.coom");
test_succeeds("a+b:foo.coom", "a+b", "", "foo.coom");
- test_succeeds("zookeeper://127.0.0.1:2181/foo/bar", "zookeeper", "127.0.0.1:2181", "/foo/bar");
+ test_succeeds("zookeeper://127.0.0.1:2181/foo/bar", "zookeeper",
+ "127.0.0.1:2181", "/foo/bar");
test_fails("xyz");
test_fails("http://www.google.com?why-are-you-using-queries");
test_fails("dns:foo.com#fragments-arent-supported-here");
diff --git a/test/core/compression/compression_test.c b/test/core/compression/compression_test.c
new file mode 100644
index 0000000000..4df0acae37
--- /dev/null
+++ b/test/core/compression/compression_test.c
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <grpc/compression.h>
+#include <grpc/support/log.h>
+#include <grpc/support/useful.h>
+
+#include "test/core/util/test_config.h"
+
+static void test_compression_algorithm_parse(void) {
+ size_t i;
+ const char* valid_names[] = {"identity", "gzip", "deflate"};
+ const grpc_compression_algorithm valid_algorithms[] = {
+ GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_DEFLATE};
+ const char* invalid_names[] = {"gzip2", "foo", "", "2gzip"};
+
+ gpr_log(GPR_DEBUG, "test_compression_algorithm_parse");
+
+ for (i = 0; i < GPR_ARRAY_SIZE(valid_names); i++) {
+ const char* valid_name = valid_names[i];
+ grpc_compression_algorithm algorithm;
+ int success;
+ success = grpc_compression_algorithm_parse(valid_name, strlen(valid_name),
+ &algorithm);
+ GPR_ASSERT(success != 0);
+ GPR_ASSERT(algorithm == valid_algorithms[i]);
+ }
+
+ for (i = 0; i < GPR_ARRAY_SIZE(invalid_names); i++) {
+ const char* invalid_name = invalid_names[i];
+ grpc_compression_algorithm algorithm;
+ int success;
+ success = grpc_compression_algorithm_parse(
+ invalid_name, strlen(invalid_name), &algorithm);
+ GPR_ASSERT(success == 0);
+ /* the value of "algorithm" is undefined upon failure */
+ }
+}
+
+int main(int argc, char** argv) {
+ test_compression_algorithm_parse();
+
+ return 0;
+}
diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c
index f5f21cff25..495841c79f 100644
--- a/test/core/compression/message_compress_test.c
+++ b/test/core/compression/message_compress_test.c
@@ -69,8 +69,7 @@ static void assert_passthrough(gpr_slice value,
"algorithm='%s' uncompressed_split='%s' compressed_split='%s'",
GPR_SLICE_LENGTH(value), gpr_murmur_hash3(GPR_SLICE_START_PTR(value),
GPR_SLICE_LENGTH(value), 0),
- algorithm_name,
- grpc_slice_split_mode_name(uncompressed_split_mode),
+ algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode),
grpc_slice_split_mode_name(compressed_split_mode));
gpr_slice_buffer_init(&input);
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index a9ba78dfdb..922de268f4 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -146,7 +146,7 @@ static int byte_buffer_eq_slice(grpc_byte_buffer *bb, gpr_slice b) {
int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) {
grpc_byte_buffer_reader reader;
- grpc_byte_buffer* rbb;
+ grpc_byte_buffer *rbb;
int res;
grpc_byte_buffer_reader_init(&reader, bb);
diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h
index 1ecd4db5da..b3e07c45a5 100644
--- a/test/core/end2end/cq_verifier.h
+++ b/test/core/end2end/cq_verifier.h
@@ -60,6 +60,7 @@ void cq_verify_empty(cq_verifier *v);
void cq_expect_completion(cq_verifier *v, void *tag, int success);
int byte_buffer_eq_string(grpc_byte_buffer *byte_buffer, const char *string);
-int contains_metadata(grpc_metadata_array *array, const char *key, const char *value);
+int contains_metadata(grpc_metadata_array *array, const char *key,
+ const char *value);
-#endif /* GRPC_TEST_CORE_END2END_CQ_VERIFIER_H */
+#endif /* GRPC_TEST_CORE_END2END_CQ_VERIFIER_H */
diff --git a/test/core/end2end/data/ssl_test_data.h b/test/core/end2end/data/ssl_test_data.h
index 4f4b30ef21..675249dbd5 100644
--- a/test/core/end2end/data/ssl_test_data.h
+++ b/test/core/end2end/data/ssl_test_data.h
@@ -38,4 +38,4 @@ extern const char test_root_cert[];
extern const char test_server1_cert[];
extern const char test_server1_key[];
-#endif /* GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H */
+#endif /* GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H */
diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c
index 7b7dbc7472..1f64062bf7 100644
--- a/test/core/end2end/dualstack_socket_test.c
+++ b/test/core/end2end/dualstack_socket_test.c
@@ -220,9 +220,8 @@ void test_connect(const char *server_host, const char *client_host, int port,
/* Destroy server. */
grpc_server_shutdown_and_notify(server, cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(server);
grpc_completion_queue_shutdown(cq);
diff --git a/test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c b/test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c
index 3c35baec6b..d82e623f22 100644
--- a/test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c
+++ b/test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c
@@ -55,8 +55,7 @@ typedef struct fullstack_secure_fixture_data {
} fullstack_secure_fixture_data;
static const grpc_metadata *find_metadata(const grpc_metadata *md,
- size_t md_count,
- const char *key,
+ size_t md_count, const char *key,
const char *value) {
size_t i;
for (i = 0; i < md_count; i++) {
diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c
index 798d4e94d4..8ae9e0ebe3 100644
--- a/test/core/end2end/fixtures/proxy.c
+++ b/test/core/end2end/fixtures/proxy.c
@@ -177,9 +177,8 @@ 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),
- NULL);
+ err = grpc_call_start_batch(
+ pc->c2p, &op, 1, new_closure(on_c2p_sent_initial_metadata, pc), NULL);
GPR_ASSERT(err == GRPC_CALL_OK);
}
@@ -339,18 +338,16 @@ static void on_new_call(void *arg, int success) {
op.op = GRPC_OP_RECV_INITIAL_METADATA;
op.data.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),
- NULL);
+ err = grpc_call_start_batch(
+ pc->p2s, &op, 1, new_closure(on_p2s_recv_initial_metadata, pc), NULL);
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_SEND_INITIAL_METADATA;
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),
- NULL);
+ err = grpc_call_start_batch(
+ pc->p2s, &op, 1, new_closure(on_p2s_sent_initial_metadata, pc), NULL);
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_RECV_MESSAGE;
@@ -375,15 +372,15 @@ static void on_new_call(void *arg, int success) {
op.data.recv_status_on_client.status_details_capacity =
&pc->p2s_status_details_capacity;
refpc(pc, "on_p2s_status");
- err = grpc_call_start_batch(pc->p2s, &op, 1,
- new_closure(on_p2s_status, pc), NULL);
+ err = grpc_call_start_batch(pc->p2s, &op, 1, new_closure(on_p2s_status, pc),
+ NULL);
GPR_ASSERT(err == GRPC_CALL_OK);
op.op = GRPC_OP_RECV_CLOSE_ON_SERVER;
op.data.recv_close_on_server.cancelled = &pc->c2p_server_cancelled;
refpc(pc, "on_c2p_closed");
- err = grpc_call_start_batch(pc->c2p, &op, 1,
- new_closure(on_c2p_closed, pc), NULL);
+ err = grpc_call_start_batch(pc->c2p, &op, 1, new_closure(on_c2p_closed, pc),
+ NULL);
GPR_ASSERT(err == GRPC_CALL_OK);
request_call(proxy);
diff --git a/test/core/end2end/multiple_server_queues_test.c b/test/core/end2end/multiple_server_queues_test.c
index 2befcd0124..5e2eaf4ae9 100644
--- a/test/core/end2end/multiple_server_queues_test.c
+++ b/test/core/end2end/multiple_server_queues_test.c
@@ -49,8 +49,8 @@ int main(int argc, char **argv) {
grpc_server_register_completion_queue(server, cq2, NULL);
grpc_server_start(server);
grpc_server_shutdown_and_notify(server, cq2, NULL);
- grpc_completion_queue_next(
- cq2, gpr_inf_future(GPR_CLOCK_REALTIME), NULL); /* cue queue hang */
+ grpc_completion_queue_next(cq2, gpr_inf_future(GPR_CLOCK_REALTIME),
+ NULL); /* cue queue hang */
grpc_completion_queue_shutdown(cq1);
grpc_completion_queue_shutdown(cq2);
grpc_completion_queue_next(cq1, gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
diff --git a/test/core/end2end/no_server_test.c b/test/core/end2end/no_server_test.c
index 6ae87288f7..619627ddd2 100644
--- a/test/core/end2end/no_server_test.c
+++ b/test/core/end2end/no_server_test.c
@@ -88,8 +88,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),
- NULL).type != GRPC_QUEUE_SHUTDOWN)
+ while (
+ grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL)
+ .type != GRPC_QUEUE_SHUTDOWN)
;
grpc_completion_queue_destroy(cq);
grpc_call_destroy(call);
diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c
index 61bbbe4855..8f28fa1e63 100644
--- a/test/core/end2end/tests/bad_hostname.c
+++ b/test/core/end2end/tests/bad_hostname.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 3715166348..313e0b05bd 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -76,9 +76,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
index ffb267c236..2430a6d218 100644
--- a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
+++ b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
@@ -76,9 +76,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c
index 7e984da591..9991ee02f0 100644
--- a/test/core/end2end/tests/cancel_after_invoke.c
+++ b/test/core/end2end/tests/cancel_after_invoke.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c
index 06e6602681..8b582e0c42 100644
--- a/test/core/end2end/tests/cancel_before_invoke.c
+++ b/test/core/end2end/tests/cancel_before_invoke.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c
index f57a44caa4..6c63d7c0ad 100644
--- a/test/core/end2end/tests/cancel_in_a_vacuum.c
+++ b/test/core/end2end/tests/cancel_in_a_vacuum.c
@@ -76,9 +76,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/cancel_test_helpers.h b/test/core/end2end/tests/cancel_test_helpers.h
index 6ea822fa9a..f8fafae597 100644
--- a/test/core/end2end/tests/cancel_test_helpers.h
+++ b/test/core/end2end/tests/cancel_test_helpers.h
@@ -42,7 +42,7 @@ typedef struct {
} cancellation_mode;
static grpc_call_error wait_for_deadline(grpc_call *call, void *reserved) {
- (void) reserved;
+ (void)reserved;
return GRPC_CALL_OK;
}
diff --git a/test/core/end2end/tests/census_simple_request.c b/test/core/end2end/tests/census_simple_request.c
index 8f615dec20..36b9e92884 100644
--- a/test/core/end2end/tests/census_simple_request.c
+++ b/test/core/end2end/tests/census_simple_request.c
@@ -66,9 +66,8 @@ static void *tag(gpr_intptr t) { return (void *)t; }
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -149,9 +148,9 @@ static void test_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/channel_connectivity.c b/test/core/end2end/tests/channel_connectivity.c
index ec0417abda..0b7a8a664b 100644
--- a/test/core/end2end/tests/channel_connectivity.c
+++ b/test/core/end2end/tests/channel_connectivity.c
@@ -48,33 +48,38 @@ static void test_connectivity(grpc_end2end_test_config config) {
config.init_client(&f, NULL);
/* channels should start life in IDLE, and stay there */
- GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 0) == GRPC_CHANNEL_IDLE);
+ GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 0) ==
+ GRPC_CHANNEL_IDLE);
gpr_sleep_until(GRPC_TIMEOUT_MILLIS_TO_DEADLINE(100));
- GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 0) == GRPC_CHANNEL_IDLE);
+ GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 0) ==
+ GRPC_CHANNEL_IDLE);
/* start watching for a change */
- grpc_channel_watch_connectivity_state(
- f.client, GRPC_CHANNEL_IDLE, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f.cq, tag(1));
+ grpc_channel_watch_connectivity_state(f.client, GRPC_CHANNEL_IDLE,
+ GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3),
+ f.cq, tag(1));
/* nothing should happen */
cq_verify_empty(cqv);
/* check that we're still in idle, and start connecting */
- GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 1) == GRPC_CHANNEL_IDLE);
+ GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 1) ==
+ GRPC_CHANNEL_IDLE);
/* and now the watch should trigger */
cq_expect_completion(cqv, tag(1), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
- GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
+ GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
state == GRPC_CHANNEL_CONNECTING);
/* quickly followed by a transition to TRANSIENT_FAILURE */
- grpc_channel_watch_connectivity_state(
- f.client, GRPC_CHANNEL_CONNECTING, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f.cq, tag(2));
+ grpc_channel_watch_connectivity_state(f.client, GRPC_CHANNEL_CONNECTING,
+ GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3),
+ f.cq, tag(2));
cq_expect_completion(cqv, tag(2), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
- GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
+ GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
state == GRPC_CHANNEL_CONNECTING);
gpr_log(GPR_DEBUG, "*** STARTING SERVER ***");
@@ -87,13 +92,13 @@ static void test_connectivity(grpc_end2end_test_config config) {
/* we'll go through some set of transitions (some might be missed), until
READY is reached */
while (state != GRPC_CHANNEL_READY) {
- grpc_channel_watch_connectivity_state(
- f.client, state, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f.cq, tag(3));
- cq_expect_completion(cqv, tag(3), 1);
+ grpc_channel_watch_connectivity_state(
+ f.client, state, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f.cq, tag(3));
+ cq_expect_completion(cqv, tag(3), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
- GPR_ASSERT(state == GRPC_CHANNEL_READY ||
- state == GRPC_CHANNEL_CONNECTING ||
+ GPR_ASSERT(state == GRPC_CHANNEL_READY ||
+ state == GRPC_CHANNEL_CONNECTING ||
state == GRPC_CHANNEL_TRANSIENT_FAILURE);
}
@@ -101,8 +106,9 @@ static void test_connectivity(grpc_end2end_test_config config) {
/* we should go immediately to TRANSIENT_FAILURE */
gpr_log(GPR_DEBUG, "*** SHUTTING DOWN SERVER ***");
- grpc_channel_watch_connectivity_state(
- f.client, GRPC_CHANNEL_READY, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f.cq, tag(4));
+ grpc_channel_watch_connectivity_state(f.client, GRPC_CHANNEL_READY,
+ GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3),
+ f.cq, tag(4));
grpc_server_shutdown_and_notify(f.server, f.cq, tag(0xdead));
@@ -110,7 +116,7 @@ static void test_connectivity(grpc_end2end_test_config config) {
cq_expect_completion(cqv, tag(0xdead), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
- GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
+ GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
state == GRPC_CHANNEL_CONNECTING);
/* cleanup server */
diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c
index 5cbf26b94f..91330c718e 100644
--- a/test/core/end2end/tests/default_host.c
+++ b/test/core/end2end/tests/default_host.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -154,9 +153,9 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(error == GRPC_CALL_OK);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(error == GRPC_CALL_OK);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
@@ -220,7 +219,9 @@ static void test_invoke_simple_request(grpc_end2end_test_config config) {
}
void grpc_end2end_tests(grpc_end2end_test_config config) {
- if ((config.feature_mask & FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION) != 0) return;
- if ((config.feature_mask & FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION) == 0) return;
+ if ((config.feature_mask & FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION) != 0)
+ return;
+ if ((config.feature_mask & FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION) == 0)
+ return;
test_invoke_simple_request(config);
}
diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c
index 0b98424c25..09762705e3 100644
--- a/test/core/end2end/tests/disappearing_server.c
+++ b/test/core/end2end/tests/disappearing_server.c
@@ -134,9 +134,9 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f->server, &s, &call_details,
- &request_metadata_recv, f->cq, f->cq,
- tag(101));
+ error =
+ grpc_server_request_call(f->server, &s, &call_details,
+ &request_metadata_recv, f->cq, f->cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
index a5683129c1..233bc9bee2 100644
--- a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
+++ b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
@@ -142,9 +142,9 @@ static void test_early_server_shutdown_finishes_inflight_calls(
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c
index feb2f18166..c93d236a6a 100644
--- a/test/core/end2end/tests/empty_batch.c
+++ b/test/core/end2end/tests/empty_batch.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c
index 9ec9430d47..d4e7a1ac6d 100644
--- a/test/core/end2end/tests/graceful_server_shutdown.c
+++ b/test/core/end2end/tests/graceful_server_shutdown.c
@@ -149,9 +149,9 @@ static void test_early_server_shutdown_finishes_inflight_calls(
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c
index 5fe369ea45..7677084511 100644
--- a/test/core/end2end/tests/invoke_large_request.c
+++ b/test/core/end2end/tests/invoke_large_request.c
@@ -73,9 +73,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -175,9 +174,9 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 203d98d100..0ba620b851 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -151,9 +150,9 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index dd30e68f42..2b9560716f 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -171,9 +170,9 @@ static void test_max_message_length(grpc_end2end_test_config config) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c
index 565d4ea280..157d0d5349 100644
--- a/test/core/end2end/tests/no_op.c
+++ b/test/core/end2end/tests/no_op.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index e19f115e40..43abda4d7f 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -158,9 +157,9 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(100));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(100));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(100), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c
index 1ef595ee56..eddce6ded4 100644
--- a/test/core/end2end/tests/registered_call.c
+++ b/test/core/end2end/tests/registered_call.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -152,9 +151,9 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
@@ -205,9 +204,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
static void test_invoke_simple_request(grpc_end2end_test_config config) {
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_simple_request", NULL, NULL);
- void *rc =
- grpc_channel_register_call(f.client, "/foo", "foo.test.google.fr:1234",
- NULL);
+ void *rc = grpc_channel_register_call(f.client, "/foo",
+ "foo.test.google.fr:1234", NULL);
simple_request_body(f, rc);
end_test(&f);
@@ -218,9 +216,8 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
int i;
grpc_end2end_test_fixture f =
begin_test(config, "test_invoke_10_simple_requests", NULL, NULL);
- void *rc =
- grpc_channel_register_call(f.client, "/foo", "foo.test.google.fr:1234",
- NULL);
+ void *rc = grpc_channel_register_call(f.client, "/foo",
+ "foo.test.google.fr:1234", NULL);
for (i = 0; i < 10; i++) {
simple_request_body(f, rc);
diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
index de6f460795..2345f94044 100644
--- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -195,9 +194,9 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_metadata_and_payload.c
index b6196ab46e..a4cc27896c 100644
--- a/test/core/end2end/tests/request_response_with_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_metadata_and_payload.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -110,10 +109,12 @@ static void test_request_response_with_metadata_and_payload(
grpc_byte_buffer *response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
- grpc_metadata meta_c[2] = {{"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}},
- {"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}};
- grpc_metadata meta_s[2] = {{"KeY3", "val3", 4, 0, {{NULL, NULL, NULL, NULL}}},
- {"KeY4", "val4", 4, 0, {{NULL, NULL, NULL, NULL}}}};
+ grpc_metadata meta_c[2] = {
+ {"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}},
+ {"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}};
+ grpc_metadata meta_s[2] = {
+ {"KeY3", "val3", 4, 0, {{NULL, NULL, NULL, NULL}}},
+ {"KeY4", "val4", 4, 0, {{NULL, NULL, NULL, NULL}}}};
grpc_end2end_test_fixture f = begin_test(
config, "test_request_response_with_metadata_and_payload", NULL, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
@@ -177,9 +178,9 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/request_response_with_payload.c b/test/core/end2end/tests/request_response_with_payload.c
index 0a45a482a3..ff00ae6d9d 100644
--- a/test/core/end2end/tests/request_response_with_payload.c
+++ b/test/core/end2end/tests/request_response_with_payload.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -168,9 +167,9 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
index 8e0bc4e2ae..9bb3abb6bf 100644
--- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
+++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
@@ -68,7 +68,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
grpc_arg fail_auth_arg = {
GRPC_ARG_STRING, FAIL_AUTH_CHECK_SERVER_ARG_NAME, {NULL}};
grpc_channel_args args;
- args.num_args= 1;
+ args.num_args = 1;
args.args = &fail_auth_arg;
config.init_server(&f, &args);
} else {
@@ -93,9 +93,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -251,9 +250,9 @@ static void request_response_with_payload_and_call_creds(
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
index 83744a8e24..8b764751f6 100644
--- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
+++ b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -110,12 +109,15 @@ static void test_request_response_with_metadata_and_payload(
grpc_byte_buffer *response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
- grpc_metadata meta_c[2] = {{"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}},
- {"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}};
- grpc_metadata meta_s[2] = {{"key3", "val3", 4, 0, {{NULL, NULL, NULL, NULL}}},
- {"key4", "val4", 4, 0, {{NULL, NULL, NULL, NULL}}}};
- grpc_metadata meta_t[2] = {{"key5", "val5", 4, 0, {{NULL, NULL, NULL, NULL}}},
- {"key6", "val6", 4, 0, {{NULL, NULL, NULL, NULL}}}};
+ grpc_metadata meta_c[2] = {
+ {"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}},
+ {"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}};
+ grpc_metadata meta_s[2] = {
+ {"key3", "val3", 4, 0, {{NULL, NULL, NULL, NULL}}},
+ {"key4", "val4", 4, 0, {{NULL, NULL, NULL, NULL}}}};
+ grpc_metadata meta_t[2] = {
+ {"key5", "val5", 4, 0, {{NULL, NULL, NULL, NULL}}},
+ {"key6", "val6", 4, 0, {{NULL, NULL, NULL, NULL}}}};
grpc_end2end_test_fixture f = begin_test(
config, "test_request_response_with_metadata_and_payload", NULL, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
@@ -179,9 +181,9 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/request_with_compressed_payload.c b/test/core/end2end/tests/request_with_compressed_payload.c
index 6a067d8d1d..299943c548 100644
--- a/test/core/end2end/tests/request_with_compressed_payload.c
+++ b/test/core/end2end/tests/request_with_compressed_payload.c
@@ -46,6 +46,7 @@
#include "test/core/end2end/cq_verifier.h"
#include "src/core/channel/channel_args.h"
#include "src/core/channel/compress_filter.h"
+#include "src/core/surface/call.h"
enum { TIMEOUT = 200000 };
@@ -79,9 +80,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -131,7 +131,8 @@ static void request_with_payload_template(
cq_verifier *cqv;
char str[1024];
- memset(str, 'x', 1023); str[1023] = '\0';
+ memset(str, 'x', 1023);
+ str[1023] = '\0';
request_payload_slice = gpr_slice_from_copied_string(str);
request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1);
@@ -188,13 +189,21 @@ static void request_with_payload_template(
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq,
- f.cq, tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
+ GPR_ASSERT(GPR_BITCOUNT(grpc_call_get_encodings_accepted_by_peer(s)) == 3);
+ GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s),
+ GRPC_COMPRESS_NONE) != 0);
+ GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s),
+ GRPC_COMPRESS_DEFLATE) != 0);
+ GPR_ASSERT(GPR_BITGET(grpc_call_get_encodings_accepted_by_peer(s),
+ GRPC_COMPRESS_GZIP) != 0);
+
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
@@ -270,8 +279,7 @@ static void test_invoke_request_with_exceptionally_uncompressed_payload(
grpc_end2end_test_config config) {
request_with_payload_template(
config, "test_invoke_request_with_exceptionally_uncompressed_payload",
- GRPC_WRITE_NO_COMPRESS, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_NONE,
- NULL);
+ GRPC_WRITE_NO_COMPRESS, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_NONE, NULL);
}
static void test_invoke_request_with_uncompressed_payload(
diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c
index 3255f14457..eb2e5dc7e8 100644
--- a/test/core/end2end/tests/request_with_flags.c
+++ b/test/core/end2end/tests/request_with_flags.c
@@ -76,9 +76,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/request_with_large_metadata.c b/test/core/end2end/tests/request_with_large_metadata.c
index 5b43caf18c..98e47aaf98 100644
--- a/test/core/end2end/tests/request_with_large_metadata.c
+++ b/test/core/end2end/tests/request_with_large_metadata.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -171,9 +170,9 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index c0013fb60f..149dbaeb00 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -75,9 +75,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c
index ab2f575263..8bacc6c730 100644
--- a/test/core/end2end/tests/server_finishes_request.c
+++ b/test/core/end2end/tests/server_finishes_request.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -149,9 +148,9 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c
index 277aa2596e..9133aacc35 100644
--- a/test/core/end2end/tests/simple_delayed_request.c
+++ b/test/core/end2end/tests/simple_delayed_request.c
@@ -63,9 +63,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -146,9 +145,9 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
config.init_server(f, server_args);
- error = grpc_server_request_call(f->server, &s, &call_details,
- &request_metadata_recv, f->cq, f->cq,
- tag(101));
+ error =
+ grpc_server_request_call(f->server, &s, &call_details,
+ &request_metadata_recv, f->cq, f->cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index d3d2f27560..0f62d958ae 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -159,9 +158,9 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c b/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c
index 4fc206cbfc..0067bb4bef 100644
--- a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c
+++ b/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c
@@ -77,9 +77,8 @@ static void drain_cq(grpc_completion_queue *cq) {
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
- GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000),
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5),
- NULL)
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
@@ -153,9 +152,9 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, op - ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- error = grpc_server_request_call(f.server, &s, &call_details,
- &request_metadata_recv, f.cq, f.cq,
- tag(101));
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
diff --git a/test/core/fling/fling_test.c b/test/core/fling/fling_test.c
index f9ba461d24..29d9050704 100644
--- a/test/core/fling/fling_test.c
+++ b/test/core/fling/fling_test.c
@@ -57,22 +57,24 @@ int main(int argc, char **argv) {
strcpy(root, ".");
}
/* start the server */
- gpr_asprintf(&args[0], "%s/fling_server%s", root, gpr_subprocess_binary_extension());
+ gpr_asprintf(&args[0], "%s/fling_server%s", root,
+ gpr_subprocess_binary_extension());
args[1] = "--bind";
gpr_join_host_port(&args[2], "::", port);
args[3] = "--no-secure";
- svr = gpr_subprocess_create(4, (const char**)args);
+ svr = gpr_subprocess_create(4, (const char **)args);
gpr_free(args[0]);
gpr_free(args[2]);
/* start the client */
- gpr_asprintf(&args[0], "%s/fling_client%s", root, gpr_subprocess_binary_extension());
+ gpr_asprintf(&args[0], "%s/fling_client%s", root,
+ gpr_subprocess_binary_extension());
args[1] = "--target";
gpr_join_host_port(&args[2], "127.0.0.1", port);
args[3] = "--scenario=ping-pong-request";
args[4] = "--no-secure";
args[5] = 0;
- cli = gpr_subprocess_create(6, (const char**)args);
+ cli = gpr_subprocess_create(6, (const char **)args);
gpr_free(args[0]);
gpr_free(args[2]);
diff --git a/test/core/fling/server.c b/test/core/fling/server.c
index 2873e4af4b..010217939d 100644
--- a/test/core/fling/server.c
+++ b/test/core/fling/server.c
@@ -248,7 +248,8 @@ int main(int argc, char **argv) {
}
ev = grpc_completion_queue_next(
cq, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
- gpr_time_from_micros(1000000, GPR_TIMESPAN)), NULL);
+ gpr_time_from_micros(1000000, GPR_TIMESPAN)),
+ NULL);
s = ev.tag;
switch (ev.type) {
case GRPC_OP_COMPLETE:
diff --git a/test/core/httpcli/format_request_test.c b/test/core/httpcli/format_request_test.c
index da850049e2..82b2ccb122 100644
--- a/test/core/httpcli/format_request_test.c
+++ b/test/core/httpcli/format_request_test.c
@@ -142,8 +142,7 @@ static void test_format_post_request_content_type_override(void) {
"POST /index.html HTTP/1.0\r\n"
"Host: example.com\r\n"
"Connection: close\r\n"
- "User-Agent: " GRPC_HTTPCLI_USER_AGENT
- "\r\n"
+ "User-Agent: " GRPC_HTTPCLI_USER_AGENT "\r\n"
"x-yz: abc\r\n"
"Content-Type: application/x-www-form-urlencoded\r\n"
"Content-Length: 11\r\n"
diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c
index 3033419118..a500effcea 100644
--- a/test/core/json/json_test.c
+++ b/test/core/json/json_test.c
@@ -66,7 +66,7 @@ static testing_pair testing_pairs[] = {
{"\"\\ud834\\udd1e\"", "\"\\ud834\\udd1e\""},
/* Testing nested empty containers. */
{
- " [ [ ] , { } , [ ] ] ", "[[],{},[]]",
+ " [ [ ] , { } , [ ] ] ", "[[],{},[]]",
},
/* Testing escapes and control chars in key strings. */
{" { \"\x7f\\n\\\\a , b\": 1, \"\": 0 } ",
diff --git a/test/core/security/auth_context_test.c b/test/core/security/auth_context_test.c
index d785eb6064..d091c7e7e6 100644
--- a/test/core/security/auth_context_test.c
+++ b/test/core/security/auth_context_test.c
@@ -151,4 +151,3 @@ int main(int argc, char **argv) {
test_chained_context();
return 0;
}
-
diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c
index da57cef15c..0bac61eb54 100644
--- a/test/core/security/json_token_test.c
+++ b/test/core/security/json_token_test.c
@@ -263,8 +263,8 @@ static void check_jwt_header(grpc_json *header) {
GPR_ASSERT(kid != NULL);
GPR_ASSERT(kid->type == GRPC_JSON_STRING);
- GPR_ASSERT(strcmp(kid->value,
- "e6b5137873db8d2ef81e06a47289e6434ec8a165") == 0);
+ GPR_ASSERT(strcmp(kid->value, "e6b5137873db8d2ef81e06a47289e6434ec8a165") ==
+ 0);
}
static void check_jwt_claim(grpc_json *claim, const char *expected_audience,
@@ -298,9 +298,11 @@ static void check_jwt_claim(grpc_json *claim, const char *expected_audience,
GPR_ASSERT(iss != NULL);
GPR_ASSERT(iss->type == GRPC_JSON_STRING);
- GPR_ASSERT(strcmp(iss->value,
- "777-abaslkan11hlb6nmim3bpspl31ud@developer.gserviceaccount.com")
- ==0);
+ GPR_ASSERT(
+ strcmp(
+ iss->value,
+ "777-abaslkan11hlb6nmim3bpspl31ud@developer.gserviceaccount.com") ==
+ 0);
if (expected_scope != NULL) {
GPR_ASSERT(scope != NULL);
diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c
index 440286ea1a..5cc8b2e9be 100644
--- a/test/core/security/jwt_verifier_test.c
+++ b/test/core/security/jwt_verifier_test.c
@@ -93,8 +93,7 @@ static const char json_key_str_part3_for_custom_email_issuer[] =
"com\", \"type\": \"service_account\" }";
static grpc_jwt_verifier_email_domain_key_url_mapping custom_mapping = {
- "bar.com", "keys.bar.com/jwk"
-};
+ "bar.com", "keys.bar.com/jwk"};
static const char expected_user_data[] = "user data";
@@ -153,7 +152,7 @@ static const char expired_claims[] =
" \"iss\": \"blah.foo.com\","
" \"sub\": \"juju@blah.foo.com\","
" \"jti\": \"jwtuniqueid\","
- " \"iat\": 100," /* Way back in the past... */
+ " \"iat\": 100," /* Way back in the past... */
" \"exp\": 120,"
" \"nbf\": 60,"
" \"foo\": \"bar\"}";
@@ -316,8 +315,8 @@ static void test_jwt_verifier_google_email_issuer_success(void) {
GPR_ASSERT(grpc_auth_json_key_is_valid(&key));
grpc_httpcli_set_override(httpcli_get_google_keys_for_email,
httpcli_post_should_not_be_called);
- jwt =
- grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, NULL);
+ jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
+ NULL);
grpc_auth_json_key_destruct(&key);
GPR_ASSERT(jwt != NULL);
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
@@ -348,8 +347,8 @@ static void test_jwt_verifier_custom_email_issuer_success(void) {
GPR_ASSERT(grpc_auth_json_key_is_valid(&key));
grpc_httpcli_set_override(httpcli_get_custom_keys_for_email,
httpcli_post_should_not_be_called);
- jwt =
- grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, NULL);
+ jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
+ NULL);
grpc_auth_json_key_destruct(&key);
GPR_ASSERT(jwt != NULL);
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
@@ -359,9 +358,10 @@ static void test_jwt_verifier_custom_email_issuer_success(void) {
grpc_httpcli_set_override(NULL, NULL);
}
-static int httpcli_get_jwk_set(
- const grpc_httpcli_request *request, gpr_timespec deadline,
- grpc_httpcli_response_cb on_response, void *user_data) {
+static int httpcli_get_jwk_set(const grpc_httpcli_request *request,
+ gpr_timespec deadline,
+ grpc_httpcli_response_cb on_response,
+ void *user_data) {
grpc_httpcli_response response = http_response(200, gpr_strdup(good_jwk_set));
GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0);
@@ -396,8 +396,8 @@ static void test_jwt_verifier_url_issuer_success(void) {
GPR_ASSERT(grpc_auth_json_key_is_valid(&key));
grpc_httpcli_set_override(httpcli_get_openid_config,
httpcli_post_should_not_be_called);
- jwt =
- grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, NULL);
+ jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
+ NULL);
grpc_auth_json_key_destruct(&key);
GPR_ASSERT(jwt != NULL);
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
@@ -436,8 +436,8 @@ static void test_jwt_verifier_url_issuer_bad_config(void) {
GPR_ASSERT(grpc_auth_json_key_is_valid(&key));
grpc_httpcli_set_override(httpcli_get_bad_json,
httpcli_post_should_not_be_called);
- jwt =
- grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, NULL);
+ jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
+ NULL);
grpc_auth_json_key_destruct(&key);
GPR_ASSERT(jwt != NULL);
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
@@ -457,8 +457,8 @@ static void test_jwt_verifier_bad_json_key(void) {
GPR_ASSERT(grpc_auth_json_key_is_valid(&key));
grpc_httpcli_set_override(httpcli_get_bad_json,
httpcli_post_should_not_be_called);
- jwt =
- grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, NULL);
+ jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
+ NULL);
grpc_auth_json_key_destruct(&key);
GPR_ASSERT(jwt != NULL);
grpc_jwt_verifier_verify(verifier, NULL, jwt, expected_audience,
@@ -503,8 +503,8 @@ static void test_jwt_verifier_bad_signature(void) {
GPR_ASSERT(grpc_auth_json_key_is_valid(&key));
grpc_httpcli_set_override(httpcli_get_openid_config,
httpcli_post_should_not_be_called);
- jwt =
- grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, NULL);
+ jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime,
+ NULL);
grpc_auth_json_key_destruct(&key);
corrupt_jwt_sig(jwt);
GPR_ASSERT(jwt != NULL);
@@ -546,7 +546,6 @@ static void test_jwt_verifier_bad_format(void) {
/* bad signature custom provided email*/
/* bad key */
-
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
test_claims_success();
@@ -562,4 +561,3 @@ int main(int argc, char **argv) {
test_jwt_verifier_bad_format();
return 0;
}
-
diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c
index 129b19bbe1..753221cada 100644
--- a/test/core/security/print_google_default_creds_token.c
+++ b/test/core/security/print_google_default_creds_token.c
@@ -49,8 +49,7 @@ typedef struct {
int is_done;
} synchronizer;
-static void on_metadata_response(void *user_data,
- grpc_credentials_md *md_elems,
+static void on_metadata_response(void *user_data, grpc_credentials_md *md_elems,
size_t num_md,
grpc_credentials_status status) {
synchronizer *sync = user_data;
diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c
index b37fd7213d..3f6c592b0b 100644
--- a/test/core/security/security_connector_test.c
+++ b/test/core/security/security_connector_test.c
@@ -77,9 +77,9 @@ static void test_unauthenticated_ssl_peer(void) {
}
static int check_identity(const grpc_auth_context *ctx,
- const char *expected_property_name,
- const char **expected_identities,
- size_t num_identities) {
+ const char *expected_property_name,
+ const char **expected_identities,
+ size_t num_identities) {
grpc_auth_property_iterator it;
const grpc_auth_property *prop;
size_t i;
@@ -166,7 +166,8 @@ static void test_cn_and_one_san_ssl_peer_to_auth_context(void) {
ctx = tsi_ssl_peer_to_auth_context(&peer);
GPR_ASSERT(ctx != NULL);
GPR_ASSERT(grpc_auth_context_peer_is_authenticated(ctx));
- GPR_ASSERT(check_identity(ctx, GRPC_X509_SAN_PROPERTY_NAME, &expected_san, 1));
+ GPR_ASSERT(
+ check_identity(ctx, GRPC_X509_SAN_PROPERTY_NAME, &expected_san, 1));
GPR_ASSERT(check_transport_security_type(ctx));
GPR_ASSERT(check_x509_cn(ctx, expected_cn));
diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c
index 8c401e4f1b..f4432667ee 100644
--- a/test/core/security/verify_jwt.c
+++ b/test/core/security/verify_jwt.c
@@ -120,4 +120,3 @@ int main(int argc, char **argv) {
gpr_cmdline_destroy(cl);
return !sync.success;
}
-
diff --git a/test/core/statistics/census_log_tests.h b/test/core/statistics/census_log_tests.h
index 28bde086f3..ec3241b4f9 100644
--- a/test/core/statistics/census_log_tests.h
+++ b/test/core/statistics/census_log_tests.h
@@ -48,4 +48,4 @@ void test_multiple_writers();
void test_performance();
void test_small_log();
-#endif /* GRPC_TEST_CORE_STATISTICS_CENSUS_LOG_TESTS_H */
+#endif /* GRPC_TEST_CORE_STATISTICS_CENSUS_LOG_TESTS_H */
diff --git a/test/core/statistics/hash_table_test.c b/test/core/statistics/hash_table_test.c
index 1e9e1c8d23..2568e96cba 100644
--- a/test/core/statistics/hash_table_test.c
+++ b/test/core/statistics/hash_table_test.c
@@ -65,8 +65,8 @@ static void free_data(void* data) { gpr_free(data); }
static void test_create_table(void) {
/* Create table with uint64 key type */
census_ht* ht = NULL;
- census_ht_option ht_options = {CENSUS_HT_UINT64, 1999, NULL,
- NULL, NULL, NULL};
+ census_ht_option ht_options = {
+ CENSUS_HT_UINT64, 1999, NULL, NULL, NULL, NULL};
ht = census_ht_create(&ht_options);
GPR_ASSERT(ht != NULL);
GPR_ASSERT(census_ht_get_size(ht) == 0);
@@ -97,7 +97,7 @@ static void test_table_with_int_key(void) {
for (i = 0; i < 20; ++i) {
census_ht_key key;
key.val = i;
- census_ht_insert(ht, key, (void*)(gpr_intptr) i);
+ census_ht_insert(ht, key, (void*)(gpr_intptr)i);
GPR_ASSERT(census_ht_get_size(ht) == i + 1);
}
for (i = 0; i < 20; i++) {
@@ -105,7 +105,7 @@ static void test_table_with_int_key(void) {
census_ht_key key;
key.val = i;
val = census_ht_find(ht, key);
- GPR_ASSERT(val == (void*)(gpr_intptr) i);
+ GPR_ASSERT(val == (void*)(gpr_intptr)i);
}
elements = census_ht_get_all_elements(ht, &num_elements);
GPR_ASSERT(elements != NULL);
@@ -212,9 +212,9 @@ static void test_table_with_string_key(void) {
census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64,
&cmp_str_keys, NULL, NULL};
census_ht* ht = census_ht_create(&opt);
- const char* keys[] = {"k1", "a", "000",
- "apple", "banana_a_long_long_long_banana", "%$",
- "111", "foo", "b"};
+ const char* keys[] = {
+ "k1", "a", "000", "apple", "banana_a_long_long_long_banana",
+ "%$", "111", "foo", "b"};
const int vals[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
int i = 0;
GPR_ASSERT(ht != NULL);
diff --git a/test/core/support/cmdline_test.c b/test/core/support/cmdline_test.c
index 26153b192c..1c77c15233 100644
--- a/test/core/support/cmdline_test.c
+++ b/test/core/support/cmdline_test.c
@@ -287,8 +287,9 @@ static void test_usage(void) {
gpr_cmdline_add_flag(cl, "flag", NULL, &flag);
usage = gpr_cmdline_usage_string(cl, "test");
- GPR_ASSERT(0 == strcmp(usage,
- "Usage: test [--str=string] [--x=int] [--flag|--no-flag]\n"));
+ GPR_ASSERT(
+ 0 == strcmp(usage,
+ "Usage: test [--str=string] [--x=int] [--flag|--no-flag]\n"));
gpr_free(usage);
gpr_cmdline_destroy(cl);
diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c
index 9023d0746b..f62cbe3435 100644
--- a/test/core/support/string_test.c
+++ b/test/core/support/string_test.c
@@ -71,7 +71,7 @@ static void test_dump(void) {
expect_dump("\x01", 1, GPR_DUMP_HEX | GPR_DUMP_ASCII, "01 '.'");
expect_dump("\x01\x02", 2, GPR_DUMP_HEX, "01 02");
expect_dump("\x01\x23\x45\x67\x89\xab\xcd\xef", 8, GPR_DUMP_HEX,
- "01 23 45 67 89 ab cd ef");
+ "01 23 45 67 89 ab cd ef");
expect_dump("ab", 2, GPR_DUMP_HEX | GPR_DUMP_ASCII, "61 62 'ab'");
}
@@ -221,7 +221,7 @@ static void test_strjoin_sep(void) {
}
static void test_strsplit(void) {
- gpr_slice_buffer* parts;
+ gpr_slice_buffer *parts;
gpr_slice str;
LOG_TEST_NAME("test_strsplit");
diff --git a/test/core/support/thd_test.c b/test/core/support/thd_test.c
index 7232cd9f5b..faba33c5e8 100644
--- a/test/core/support/thd_test.c
+++ b/test/core/support/thd_test.c
@@ -60,7 +60,7 @@ static void thd_body(void *v) {
gpr_mu_unlock(&t->mu);
}
-static void thd_body_joinable(void *v) { }
+static void thd_body_joinable(void *v) {}
/* Test that we can create a number of threads and wait for them. */
static void test(void) {
diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c
index 0741ab920d..a5298a25e0 100644
--- a/test/core/surface/completion_queue_test.c
+++ b/test/core/surface/completion_queue_test.c
@@ -105,8 +105,8 @@ static void test_shutdown_then_next_polling(void) {
cc = grpc_completion_queue_create(NULL);
grpc_completion_queue_shutdown(cc);
- event = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME),
- NULL);
+ event =
+ grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(event.type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cc);
}
@@ -118,8 +118,8 @@ static void test_shutdown_then_next_with_timeout(void) {
cc = grpc_completion_queue_create(NULL);
grpc_completion_queue_shutdown(cc);
- event = grpc_completion_queue_next(cc, gpr_inf_future(GPR_CLOCK_REALTIME),
- NULL);
+ event =
+ grpc_completion_queue_next(cc, gpr_inf_future(GPR_CLOCK_REALTIME), NULL);
GPR_ASSERT(event.type == GRPC_QUEUE_SHUTDOWN);
grpc_completion_queue_destroy(cc);
}
diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c
index 216eeca8e1..96434193c9 100644
--- a/test/core/surface/lame_client_test.c
+++ b/test/core/surface/lame_client_test.c
@@ -58,13 +58,13 @@ int main(int argc, char **argv) {
grpc_metadata_array_init(&trailing_metadata_recv);
- chan = grpc_lame_client_channel_create("lampoon:national");
+ chan = grpc_lame_client_channel_create(
+ "lampoon:national", GRPC_STATUS_UNKNOWN, "Rpc sent on a lame channel.");
GPR_ASSERT(chan);
cq = grpc_completion_queue_create(NULL);
call = grpc_channel_create_call(chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq,
"/Foo", "anywhere",
- GRPC_TIMEOUT_SECONDS_TO_DEADLINE(100),
- NULL);
+ GRPC_TIMEOUT_SECONDS_TO_DEADLINE(100), NULL);
GPR_ASSERT(call);
cqv = cq_verifier_create(cq);
diff --git a/test/core/transport/chttp2/stream_map_test.c b/test/core/transport/chttp2/stream_map_test.c
index 3c6976ee9d..b0bb3a8904 100644
--- a/test/core/transport/chttp2/stream_map_test.c
+++ b/test/core/transport/chttp2/stream_map_test.c
@@ -93,7 +93,7 @@ static void test_basic_add_find(size_t n) {
grpc_chttp2_stream_map_init(&map, 8);
GPR_ASSERT(0 == grpc_chttp2_stream_map_size(&map));
for (i = 1; i <= n; i++) {
- grpc_chttp2_stream_map_add(&map, i, (void *)(gpr_uintptr) i);
+ grpc_chttp2_stream_map_add(&map, i, (void *)(gpr_uintptr)i);
}
GPR_ASSERT(n == grpc_chttp2_stream_map_size(&map));
GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, 0));
@@ -148,7 +148,7 @@ static void test_delete_evens_sweep(size_t n) {
grpc_chttp2_stream_map_init(&map, 8);
for (i = 1; i <= n; i++) {
- grpc_chttp2_stream_map_add(&map, i, (void *)(gpr_uintptr) i);
+ grpc_chttp2_stream_map_add(&map, i, (void *)(gpr_uintptr)i);
}
for (i = 1; i <= n; i++) {
if ((i & 1) == 0) {
@@ -170,7 +170,7 @@ static void test_delete_evens_incremental(size_t n) {
grpc_chttp2_stream_map_init(&map, 8);
for (i = 1; i <= n; i++) {
- grpc_chttp2_stream_map_add(&map, i, (void *)(gpr_uintptr) i);
+ grpc_chttp2_stream_map_add(&map, i, (void *)(gpr_uintptr)i);
if ((i & 1) == 0) {
grpc_chttp2_stream_map_delete(&map, i);
}
diff --git a/test/core/util/grpc_profiler.h b/test/core/util/grpc_profiler.h
index 347a1d39d5..88ec6bcb0e 100644
--- a/test/core/util/grpc_profiler.h
+++ b/test/core/util/grpc_profiler.h
@@ -45,4 +45,4 @@ void grpc_profiler_stop();
}
#endif /* __cplusplus */
-#endif /* GRPC_TEST_CORE_UTIL_GRPC_PROFILER_H */
+#endif /* GRPC_TEST_CORE_UTIL_GRPC_PROFILER_H */
diff --git a/test/core/util/parse_hexstring.h b/test/core/util/parse_hexstring.h
index 22bbd1756f..ddbfe541c6 100644
--- a/test/core/util/parse_hexstring.h
+++ b/test/core/util/parse_hexstring.h
@@ -38,4 +38,4 @@
gpr_slice parse_hexstring(const char *hexstring);
-#endif /* GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H */
+#endif /* GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H */
diff --git a/test/core/util/port.h b/test/core/util/port.h
index b516ec5a48..93788bcab2 100644
--- a/test/core/util/port.h
+++ b/test/core/util/port.h
@@ -49,4 +49,4 @@ int grpc_pick_unused_port_or_die();
}
#endif
-#endif /* GRPC_TEST_CORE_UTIL_PORT_H */
+#endif /* GRPC_TEST_CORE_UTIL_PORT_H */
diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c
index fc52150435..5b072f805a 100644
--- a/test/core/util/port_windows.c
+++ b/test/core/util/port_windows.c
@@ -63,7 +63,8 @@ static int is_port_available(int *port, int is_tcp) {
}
/* Reuseaddr lets us start up a server immediately after it exits */
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&one, sizeof(one)) < 0) {
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char *)&one,
+ sizeof(one)) < 0) {
gpr_log(GPR_ERROR, "setsockopt() failed: %s", strerror(errno));
closesocket(fd);
return 0;
@@ -75,14 +76,14 @@ static int is_port_available(int *port, int is_tcp) {
addr.sin_port = htons(*port);
if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
gpr_log(GPR_DEBUG, "bind(port=%d) failed: %s", *port, strerror(errno));
- closesocket(fd);
+ closesocket(fd);
return 0;
}
/* Get the bound port number */
if (getsockname(fd, (struct sockaddr *)&addr, &alen) < 0) {
gpr_log(GPR_ERROR, "getsockname() failed: %s", strerror(errno));
- closesocket(fd);
+ closesocket(fd);
return 0;
}
GPR_ASSERT(alen <= sizeof(addr));
@@ -113,11 +114,13 @@ int grpc_pick_unused_port(void) {
/* Type of port to first pick in next iteration */
int is_tcp = 1;
- int try = 0;
+ int try
+ = 0;
for (;;) {
int port;
- try++;
+ try
+ ++;
if (try == 1) {
port = _getpid() % (65536 - 30000) + 30000;
} else if (try <= NUM_RANDOM_PORTS_TO_PICK) {
diff --git a/test/core/util/slice_splitter.h b/test/core/util/slice_splitter.h
index 1ce1c097e2..d030c2cb55 100644
--- a/test/core/util/slice_splitter.h
+++ b/test/core/util/slice_splitter.h
@@ -65,4 +65,4 @@ gpr_slice grpc_slice_merge(gpr_slice *slices, size_t nslices);
const char *grpc_slice_split_mode_name(grpc_slice_split_mode mode);
-#endif /* GRPC_TEST_CORE_UTIL_SLICE_SPLITTER_H */
+#endif /* GRPC_TEST_CORE_UTIL_SLICE_SPLITTER_H */
diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c
index cadf88a7c6..685bdff530 100644
--- a/test/core/util/test_config.c
+++ b/test/core/util/test_config.c
@@ -78,16 +78,16 @@ void abort_handler(int sig) {
}
static void install_crash_handler() {
- SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER) crash_handler);
+ SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)crash_handler);
_set_abort_behavior(0, _WRITE_ABORT_MSG);
_set_abort_behavior(0, _CALL_REPORTFAULT);
signal(SIGABRT, abort_handler);
}
#else
-static void install_crash_handler() { }
+static void install_crash_handler() {}
#endif
-void grpc_test_init(int argc, char **argv) {
+void grpc_test_init(int argc, char** argv) {
install_crash_handler();
gpr_log(GPR_DEBUG, "test slowdown: machine=%f build=%f total=%f",
(double)GRPC_TEST_SLOWDOWN_MACHINE_FACTOR,