changes for bazel and test certificates

pull/13147/head
Yash Tibrewal 8 years ago
parent e92294c587
commit 2aa79cbfd3
  1. 8
      test/core/end2end/data/ssl_test_data.h
  2. 7
      test/core/end2end/fuzzers/api_fuzzer.cc
  3. 7
      test/core/network_benchmarks/low_level_ping_pong.cc

@ -19,6 +19,10 @@
#ifndef GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H #ifndef GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H
#define 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_root_cert[];
extern const char test_server1_cert[]; extern const char test_server1_cert[];
extern const char test_server1_key[]; 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_cert[];
extern const char test_signed_client_key[]; extern const char test_signed_client_key[];
#ifdef __cplusplus
}
#endif
#endif /* GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H */ #endif /* GRPC_TEST_CORE_END2END_DATA_SSL_TEST_DATA_H */

@ -439,7 +439,7 @@ grpc_ares_request *my_dns_lookup_ares(
extern "C" void (*grpc_tcp_client_connect_impl)( extern "C" void (*grpc_tcp_client_connect_impl)(
grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args, 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, static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_endpoint **ep, gpr_timespec deadline); 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, grpc_pollset_set *interested_parties,
const grpc_channel_args *channel_args, const grpc_channel_args *channel_args,
const grpc_resolved_address *addr, const grpc_resolved_address *addr,
gpr_timespec deadline) { grpc_millis deadline) {
sched_connect(exec_ctx, closure, ep, deadline); sched_connect(exec_ctx, closure, ep,
grpc_millis_to_timespec(deadline, GPR_CLOCK_MONOTONIC));
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

@ -555,7 +555,8 @@ static test_strategy test_strategies[] = {
static const char *socket_types[] = {"tcp", "socketpair", "pipe"}; 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) { if (strcmp(socket_type, "tcp") == 0) {
create_sockets_tcp(client_fds, server_fds); create_sockets_tcp(client_fds, server_fds);
} else if (strcmp(socket_type, "socketpair") == 0) { } 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; 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) { thread_args *server_args) {
gpr_thd_id tid; gpr_thd_id tid;
int rv = 0; 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))); static_cast<thread_args *>(gpr_malloc(sizeof(thread_args)));
thread_args *server_args = thread_args *server_args =
static_cast<thread_args *>(gpr_malloc(sizeof(thread_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->read_bytes = strategy->read_strategy;
client_args->write_bytes = blocking_write_bytes; client_args->write_bytes = blocking_write_bytes;

Loading…
Cancel
Save