Blame SOURCES/glibc-rh1526193.patch

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