about summary refs log tree commit diff
path: root/nptl/tst-cond16.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-08-30 16:20:20 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-08-30 16:20:31 +0200
commit9ce673b69e82578044958f66d93dcaddb23f6e95 (patch)
treea7e1213cdd59a96f412c2a7e2427b03279f0bddf /nptl/tst-cond16.c
parent8a0e619652cd6846e04a55cb380d7a7205b65e27 (diff)
downloadglibc-9ce673b69e82578044958f66d93dcaddb23f6e95.tar.gz
glibc-9ce673b69e82578044958f66d93dcaddb23f6e95.tar.xz
glibc-9ce673b69e82578044958f66d93dcaddb23f6e95.zip
Do not scale NPTL tests with available number of CPUs
On very large multi-processor systems, creating hundreds of threads
runs into a test time out.  The tests do not seem to benefit from
massive over-scheduling.
Diffstat (limited to 'nptl/tst-cond16.c')
-rw-r--r--nptl/tst-cond16.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/nptl/tst-cond16.c b/nptl/tst-cond16.c
index 032677adcc..b3bfb90bd4 100644
--- a/nptl/tst-cond16.c
+++ b/nptl/tst-cond16.c
@@ -28,7 +28,7 @@ pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
 pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
 bool n, exiting;
 FILE *f;
-int count;
+enum { count = 8 };		/* Number of worker threads.  */
 
 void *
 tf (void *dummy)
@@ -71,11 +71,6 @@ do_test (void)
       return 1;
     }
 
-  count = sysconf (_SC_NPROCESSORS_ONLN);
-  if (count <= 0)
-    count = 1;
-  count *= 4;
-
   pthread_t th[count];
   pthread_attr_t attr;
   int i, ret, sz;