00db10
commit 9ce673b69e82578044958f66d93dcaddb23f6e95
00db10
Author: Florian Weimer <fweimer@redhat.com>
00db10
Date:   Wed Aug 30 16:20:20 2017 +0200
00db10
00db10
    Do not scale NPTL tests with available number of CPUs
00db10
    
00db10
    On very large multi-processor systems, creating hundreds of threads
00db10
    runs into a test time out.  The tests do not seem to benefit from
00db10
    massive over-scheduling.
00db10
00db10
Index: b/nptl/tst-cond16.c
00db10
===================================================================
00db10
--- a/nptl/tst-cond16.c
00db10
+++ b/nptl/tst-cond16.c
00db10
@@ -27,7 +27,7 @@ pthread_cond_t cv = PTHREAD_COND_INITIAL
00db10
 pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
00db10
 bool n, exiting;
00db10
 FILE *f;
00db10
-int count;
00db10
+enum { count = 8 };		/* Number of worker threads.  */
00db10
 
00db10
 void *
00db10
 tf (void *dummy)
00db10
@@ -70,11 +70,6 @@ do_test (void)
00db10
       return 1;
00db10
     }
00db10
 
00db10
-  count = sysconf (_SC_NPROCESSORS_ONLN);
00db10
-  if (count <= 0)
00db10
-    count = 1;
00db10
-  count *= 4;
00db10
-
00db10
   pthread_t th[count];
00db10
   pthread_attr_t attr;
00db10
   int i, ret, sz;
00db10
Index: b/nptl/tst-cond18.c
00db10
===================================================================
00db10
--- a/nptl/tst-cond18.c
00db10
+++ b/nptl/tst-cond18.c
00db10
@@ -27,7 +27,8 @@
00db10
 pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
00db10
 pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
00db10
 bool exiting;
00db10
-int fd, count, spins, nn;
00db10
+int fd, spins, nn;
00db10
+enum { count = 8 };		/* Number of worker threads.  */
00db10
 
00db10
 void *
00db10
 tf (void *id)
00db10
@@ -81,11 +82,6 @@ do_test (void)
00db10
       return 1;
00db10
     }
00db10
 
00db10
-  count = sysconf (_SC_NPROCESSORS_ONLN);
00db10
-  if (count <= 0)
00db10
-    count = 1;
00db10
-  count *= 8;
00db10
-
00db10
   pthread_t th[count + 1];
00db10
   pthread_attr_t attr;
00db10
   int i, ret, sz;