diff options
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/end2end/data/ssl_test_data.h | 8 | ||||
-rw-r--r-- | test/core/end2end/fuzzers/api_fuzzer.cc | 7 | ||||
-rw-r--r-- | test/core/network_benchmarks/low_level_ping_pong.cc | 7 |
3 files changed, 16 insertions, 6 deletions
diff --git a/test/core/end2end/data/ssl_test_data.h b/test/core/end2end/data/ssl_test_data.h index 303f3a6eda..e9c7dbceb2 100644 --- a/test/core/end2end/data/ssl_test_data.h +++ b/test/core/end2end/data/ssl_test_data.h @@ -19,6 +19,10 @@ #ifndef GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H #define GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H +#ifdef __cplusplus +extern "C" { +#endif + extern const char test_root_cert[]; extern const char test_server1_cert[]; extern const char test_server1_key[]; @@ -27,4 +31,8 @@ extern const char test_self_signed_client_key[]; extern const char test_signed_client_cert[]; extern const char test_signed_client_key[]; +#ifdef __cplusplus +} +#endif + #endif /* GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H */ diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc index 1e1ee0fcbe..9d313d0255 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.cc +++ b/test/core/end2end/fuzzers/api_fuzzer.cc @@ -439,7 +439,7 @@ grpc_ares_request *my_dns_lookup_ares( extern "C" void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args, - const grpc_resolved_address *addr, gpr_timespec deadline); + const grpc_resolved_address *addr, grpc_millis deadline); static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline); @@ -497,8 +497,9 @@ static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args, const grpc_resolved_address *addr, - gpr_timespec deadline) { - sched_connect(exec_ctx, closure, ep, deadline); + grpc_millis deadline) { + sched_connect(exec_ctx, closure, ep, + grpc_millis_to_timespec(deadline, GPR_CLOCK_MONOTONIC)); } //////////////////////////////////////////////////////////////////////////////// diff --git a/test/core/network_benchmarks/low_level_ping_pong.cc b/test/core/network_benchmarks/low_level_ping_pong.cc index 8aed0bccbd..4bbdc67fbc 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.cc +++ b/test/core/network_benchmarks/low_level_ping_pong.cc @@ -555,7 +555,8 @@ static test_strategy test_strategies[] = { static const char *socket_types[] = {"tcp", "socketpair", "pipe"}; -int create_socket(char *socket_type, fd_pair *client_fds, fd_pair *server_fds) { +int create_socket(const char *socket_type, fd_pair *client_fds, + fd_pair *server_fds) { if (strcmp(socket_type, "tcp") == 0) { create_sockets_tcp(client_fds, server_fds); } else if (strcmp(socket_type, "socketpair") == 0) { @@ -569,7 +570,7 @@ int create_socket(char *socket_type, fd_pair *client_fds, fd_pair *server_fds) { return 0; } -static int run_benchmark(char *socket_type, thread_args *client_args, +static int run_benchmark(const char *socket_type, thread_args *client_args, thread_args *server_args) { gpr_thd_id tid; int rv = 0; @@ -598,7 +599,7 @@ static int run_all_benchmarks(size_t msg_size) { static_cast<thread_args *>(gpr_malloc(sizeof(thread_args))); thread_args *server_args = static_cast<thread_args *>(gpr_malloc(sizeof(thread_args))); - char *socket_type = socket_types[j]; + const char *socket_type = socket_types[j]; client_args->read_bytes = strategy->read_strategy; client_args->write_bytes = blocking_write_bytes; |