about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-11-11 10:26:52 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-11 13:40:55 +0100
commit10cf7f52c60209f34199d216ef6710568d6297bf (patch)
tree4d05d95dba80ac251e33c6db641c02f6bbb106e8 /sysdeps/unix
parent36ada9ee2cd3b686df6952446b92816584eacbb8 (diff)
downloadglibc-10cf7f52c60209f34199d216ef6710568d6297bf.tar.gz
glibc-10cf7f52c60209f34199d216ef6710568d6297bf.tar.xz
glibc-10cf7f52c60209f34199d216ef6710568d6297bf.zip
linux: Reduce stack size for nptl/tst-thread-affinity-pthread
And related tests.  These tests create a thread for each core, so
they may fail due to address space limitations with the default
stack size.

Change-Id: Ieef44a7731f58d3b7d6638cce4ccd31126647551
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
index 73f458224e..2b4ca5e4a2 100644
--- a/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
+++ b/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
@@ -24,6 +24,7 @@
 #include <pthread.h>
 #include <stdbool.h>
 #include <stdlib.h>
+#include <support/xthread.h>
 #include <sys/time.h>
 
 struct conf;
@@ -191,6 +192,7 @@ early_test (struct conf *conf)
       printf ("error: pthread_attr_init failed: %s\n", strerror (ret));
       return false;
     }
+  support_set_small_thread_stack_size (&attr);
 
   /* Spawn a thread pinned to each available CPU.  */
   for (int cpu = 0; cpu <= conf->last_cpu; ++cpu)
@@ -228,7 +230,8 @@ early_test (struct conf *conf)
     {
       if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set))
 	continue;
-      ret = pthread_create (&other_threads[cpu].self, NULL,
+      ret = pthread_create (&other_threads[cpu].self,
+			    support_small_stack_thread_attribute (),
 			    thread_burn_any_cpu, other_threads + cpu);
       if (ret != 0)
 	{