aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/support')
-rw-r--r--test/core/support/arena_test.cc3
-rw-r--r--test/core/support/cpu_test.cc3
-rw-r--r--test/core/support/mpscq_test.cc9
-rw-r--r--test/core/support/spinlock_test.cc3
-rw-r--r--test/core/support/sync_test.cc4
-rw-r--r--test/core/support/thd_test.cc5
-rw-r--r--test/core/support/tls_test.cc2
7 files changed, 18 insertions, 11 deletions
diff --git a/test/core/support/arena_test.cc b/test/core/support/arena_test.cc
index 244d860639..ada0f43854 100644
--- a/test/core/support/arena_test.cc
+++ b/test/core/support/arena_test.cc
@@ -100,7 +100,8 @@ static void concurrent_test(void) {
for (int i = 0; i < CONCURRENT_TEST_THREADS; i++) {
gpr_thd_options opt = gpr_thd_options_default();
gpr_thd_options_set_joinable(&opt);
- gpr_thd_new(&thds[i], concurrent_test_body, &args, &opt);
+ gpr_thd_new(&thds[i], "grpc_concurrent_test", concurrent_test_body, &args,
+ &opt);
}
gpr_event_set(&args.ev_start, (void*)1);
diff --git a/test/core/support/cpu_test.cc b/test/core/support/cpu_test.cc
index 770b074d47..334c4318e1 100644
--- a/test/core/support/cpu_test.cc
+++ b/test/core/support/cpu_test.cc
@@ -110,7 +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, &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) {
diff --git a/test/core/support/mpscq_test.cc b/test/core/support/mpscq_test.cc
index 50ff8174f6..1b83f7d5be 100644
--- a/test/core/support/mpscq_test.cc
+++ b/test/core/support/mpscq_test.cc
@@ -85,7 +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], 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;
@@ -156,7 +157,8 @@ static void test_mt_multipop(void) {
ta[i].ctr = 0;
ta[i].q = &q;
ta[i].start = &start;
- GPR_ASSERT(gpr_thd_new(&thds[i], test_thread, &ta[i], &options));
+ GPR_ASSERT(gpr_thd_new(&thds[i], "grpc_multipop_test", test_thread, &ta[i],
+ &options));
}
pull_args pa;
pa.ta = ta;
@@ -169,7 +171,8 @@ static void test_mt_multipop(void) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(pull_thds); i++) {
gpr_thd_options options = gpr_thd_options_default();
gpr_thd_options_set_joinable(&options);
- GPR_ASSERT(gpr_thd_new(&pull_thds[i], pull_thread, &pa, &options));
+ GPR_ASSERT(gpr_thd_new(&pull_thds[i], "grpc_multipop_pull", pull_thread,
+ &pa, &options));
}
gpr_event_set(&start, (void*)1);
for (size_t i = 0; i < GPR_ARRAY_SIZE(pull_thds); i++) {
diff --git a/test/core/support/spinlock_test.cc b/test/core/support/spinlock_test.cc
index 3639802cd7..58d5fcd42b 100644
--- a/test/core/support/spinlock_test.cc
+++ b/test/core/support/spinlock_test.cc
@@ -67,7 +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], body, m, &opt));
+ GPR_ASSERT(
+ gpr_thd_new(&m->threads[i], "grpc_create_threads", body, m, &opt));
}
}
diff --git a/test/core/support/sync_test.cc b/test/core/support/sync_test.cc
index c882488243..fb7ec44754 100644
--- a/test/core/support/sync_test.cc
+++ b/test/core/support/sync_test.cc
@@ -189,7 +189,7 @@ static void test_create_threads(struct test* m, void (*body)(void* arg)) {
gpr_thd_id id;
int i;
for (i = 0; i != m->threads; i++) {
- GPR_ASSERT(gpr_thd_new(&id, body, m, nullptr));
+ GPR_ASSERT(gpr_thd_new(&id, "grpc_create_threads", body, m, nullptr));
}
}
@@ -244,7 +244,7 @@ static void test(const char* name, void (*body)(void* m),
m = test_new(10, iterations, incr_step);
if (extra != nullptr) {
gpr_thd_id id;
- GPR_ASSERT(gpr_thd_new(&id, extra, m, nullptr));
+ GPR_ASSERT(gpr_thd_new(&id, name, extra, m, nullptr));
m->done++; /* one more thread to wait for */
}
test_create_threads(m, body);
diff --git a/test/core/support/thd_test.cc b/test/core/support/thd_test.cc
index 34befd80d1..b755bf18f3 100644
--- a/test/core/support/thd_test.cc
+++ b/test/core/support/thd_test.cc
@@ -74,7 +74,7 @@ static void test(void) {
t.n = NUM_THREADS;
t.is_done = 0;
for (i = 0; i < NUM_THREADS; i++) {
- GPR_ASSERT(gpr_thd_new(&thd, &thd_body, &t, nullptr));
+ GPR_ASSERT(gpr_thd_new(&thd, "grpc_thread_test", &thd_body, &t, nullptr));
}
gpr_mu_lock(&t.mu);
while (!t.is_done) {
@@ -84,7 +84,8 @@ static void test(void) {
GPR_ASSERT(t.n == 0);
gpr_thd_options_set_joinable(&options);
for (i = 0; i < NUM_THREADS; i++) {
- GPR_ASSERT(gpr_thd_new(&thds[i], &thd_body_joinable, nullptr, &options));
+ GPR_ASSERT(gpr_thd_new(&thds[i], "grpc_joinable_thread_test",
+ &thd_body_joinable, nullptr, &options));
}
for (i = 0; i < NUM_THREADS; i++) {
gpr_thd_join(thds[i]);
diff --git a/test/core/support/tls_test.cc b/test/core/support/tls_test.cc
index 0f64d2ee7c..743b10f090 100644
--- a/test/core/support/tls_test.cc
+++ b/test/core/support/tls_test.cc
@@ -56,7 +56,7 @@ int main(int argc, char* argv[]) {
gpr_thd_options_set_joinable(&opt);
for (i = 0; i < NUM_THREADS; i++) {
- gpr_thd_new(&threads[i], thd_body, nullptr, &opt);
+ gpr_thd_new(&threads[i], "grpc_tls_test", thd_body, nullptr, &opt);
}
for (i = 0; i < NUM_THREADS; i++) {
gpr_thd_join(threads[i]);