Merge pull request #1 from vjpai/dmac

Changes needed to make gRPC tests pass
pull/13559/head
dmaclach 7 years ago committed by GitHub
commit 71606c8dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/lib/support/thd_posix.cc
  2. 4
      test/core/end2end/fixtures/http_proxy_fixture.cc
  3. 4
      test/core/end2end/fixtures/proxy.cc
  4. 4
      test/core/end2end/tests/connectivity.cc
  5. 4
      test/core/handshake/server_ssl_common.cc
  6. 2
      test/core/network_benchmarks/low_level_ping_pong.cc
  7. 4
      test/core/support/cpu_test.cc
  8. 4
      test/core/support/mpscq_test.cc
  9. 4
      test/core/support/spinlock_test.cc
  10. 7
      test/core/surface/concurrent_connectivity_test.cc

@ -62,7 +62,7 @@ static void* thread_body(void* v) {
strncpy(buf, a.name, buf_len);
buf[buf_len] = '\0';
pthread_setname_np(pthread_self(), buf);
#endif // GPR_APPLE_PTHREAD_NAME
#endif // GPR_APPLE_PTHREAD_NAME
}
(*a.body)(a.arg);
dec_thd_count();

@ -529,8 +529,8 @@ grpc_end2end_http_proxy* grpc_end2end_http_proxy_create(
// Start proxy thread.
gpr_thd_options opt = gpr_thd_options_default();
gpr_thd_options_set_joinable(&opt);
GPR_ASSERT(gpr_thd_new(&proxy->thd, "grpc_http_proxy", thread_main, proxy,
&opt));
GPR_ASSERT(
gpr_thd_new(&proxy->thd, "grpc_http_proxy", thread_main, proxy, &opt));
return proxy;
}

@ -98,8 +98,8 @@ grpc_end2end_proxy* grpc_end2end_proxy_create(const grpc_end2end_proxy_def* def,
grpc_call_details_init(&proxy->new_call_details);
gpr_thd_options_set_joinable(&opt);
GPR_ASSERT(gpr_thd_new(&proxy->thd, "grpc_end2end_proxy", thread_main, proxy,
&opt));
GPR_ASSERT(
gpr_thd_new(&proxy->thd, "grpc_end2end_proxy", thread_main, proxy, &opt));
request_call(proxy);

@ -68,8 +68,8 @@ static void test_connectivity(grpc_end2end_test_config config) {
ce.cq = f.cq;
gpr_event_init(&ce.started);
gpr_thd_options_set_joinable(&thdopt);
GPR_ASSERT(gpr_thd_new(&thdid, "grpc_connectivity", child_thread, &ce,
&thdopt));
GPR_ASSERT(
gpr_thd_new(&thdid, "grpc_connectivity", child_thread, &ce, &thdopt));
gpr_event_wait(&ce.started, gpr_inf_future(GPR_CLOCK_MONOTONIC));

@ -137,8 +137,8 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len,
gpr_thd_options thdopt = gpr_thd_options_default();
gpr_thd_id thdid;
gpr_thd_options_set_joinable(&thdopt);
GPR_ASSERT(gpr_thd_new(&thdid, "grpc_ssl_test", server_thread, &port,
&thdopt));
GPR_ASSERT(
gpr_thd_new(&thdid, "grpc_ssl_test", server_thread, &port, &thdopt));
SSL_load_error_strings();
OpenSSL_add_ssl_algorithms();

@ -583,7 +583,7 @@ static int run_benchmark(const char* socket_type, thread_args* client_args,
gpr_log(GPR_INFO, "Starting test %s %s %zu", client_args->strategy_name,
socket_type, client_args->msg_size);
gpr_thd_new(&tid, server_thread_wrap, server_args, nullptr);
gpr_thd_new(&tid, "server_thread", server_thread_wrap, server_args, nullptr);
client_thread(client_args);
return 0;
}

@ -110,8 +110,8 @@ static void cpu_test(void) {
gpr_cv_init(&ct.done_cv);
ct.is_done = 0;
for (i = 0; i < ct.ncores * 3; i++) {
GPR_ASSERT(gpr_thd_new(&thd, "grpc_cpu_test", &worker_thread, &ct,
nullptr));
GPR_ASSERT(
gpr_thd_new(&thd, "grpc_cpu_test", &worker_thread, &ct, nullptr));
}
gpr_mu_lock(&ct.mu);
while (!ct.is_done) {

@ -85,8 +85,8 @@ static void test_mt(void) {
ta[i].ctr = 0;
ta[i].q = &q;
ta[i].start = &start;
GPR_ASSERT(gpr_thd_new(&thds[i], "grpc_mt_test", test_thread, &ta[i],
&options));
GPR_ASSERT(
gpr_thd_new(&thds[i], "grpc_mt_test", test_thread, &ta[i], &options));
}
size_t num_done = 0;
size_t spins = 0;

@ -67,8 +67,8 @@ static void test_create_threads(struct test* m, void (*body)(void* arg)) {
for (i = 0; i != m->thread_count; i++) {
gpr_thd_options opt = gpr_thd_options_default();
gpr_thd_options_set_joinable(&opt);
GPR_ASSERT(gpr_thd_new(&m->threads[i], "grpc_create_threads", body, m,
&opt));
GPR_ASSERT(
gpr_thd_new(&m->threads[i], "grpc_create_threads", body, m, &opt));
}
}

@ -220,7 +220,8 @@ int run_concurrent_connectivity_test() {
args.pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size()));
grpc_pollset_init(args.pollset, &args.mu);
gpr_event_init(&args.ready);
gpr_thd_new(&server, "grpc_wave_3_server", bad_server_thread, &args, &options);
gpr_thd_new(&server, "grpc_wave_3_server", bad_server_thread, &args,
&options);
gpr_event_wait(&args.ready, gpr_inf_future(GPR_CLOCK_MONOTONIC));
for (size_t i = 0; i < NUM_THREADS; ++i) {
@ -283,8 +284,8 @@ int run_concurrent_watches_with_short_timeouts_test() {
gpr_thd_options_set_joinable(&options);
for (size_t i = 0; i < NUM_THREADS; ++i) {
gpr_thd_new(&threads[i], "grpc_short_watches",
watches_with_short_timeouts, localhost, &options);
gpr_thd_new(&threads[i], "grpc_short_watches", watches_with_short_timeouts,
localhost, &options);
}
for (size_t i = 0; i < NUM_THREADS; ++i) {
gpr_thd_join(threads[i]);

Loading…
Cancel
Save