00db10
The commit included in glibc-rh1372304-1.patch removes custom TIMEOUT
00db10
definitions from the tests it changes. Some of those tests are expected to
00db10
run for longer than the current default TIMEOUT (2 sec) set in
00db10
test-skeleton.c and so can time-out and fail when run. This commit avoids
00db10
the spurious failures by increasing the default TIMEOUT to 20 sec. Upstream,
00db10
this commit preceded the one included in glibc-rh1372304-1.patch.
00db10
00db10
commit a28605b22946c708f0a5c4f06307e1a17650ced8
00db10
Author: Mike Frysinger <vapier@gentoo.org>
00db10
Date:   Tue Jan 19 09:18:00 2016 -0500
00db10
00db10
    test-skeleton: increase default TIMEOUT to 20 seconds
00db10
    
00db10
    The vast majority of timeouts I've seen w/glibc tests are due to:
00db10
     - slow system (e.g. <1 GHz cpu)
00db10
     - loaded system (e.g. lots of parallelism)
00db10
    Even then, I've seen timeouts on system I don't generally consider
00db10
    slow, or even loaded, and considering TIMEOUT is set to <=10 in ~60
00db10
    tests (and <=20 in ~75 tests), it seems I'm not alone.  I've just
00db10
    gotten in the habit of doing `export TIMEOUTFACTOR=10` on all my
00db10
    setups.
00db10
    
00db10
    In the edge case where there is a bug in the test and the timeout is
00db10
    hit, I think we all agree that's either a problem with the test or a
00db10
    real bug in the library somewhere.  In either case, the incident rate
00db10
    should be low, so catering to that seems like the wrong trade-off.
00db10
    
00db10
    Other developers too usually set large timeout factors.  Increase the
00db10
    default to 20 seconds to match reality.
00db10
00db10
Index: b/test-skeleton.c
00db10
===================================================================
00db10
--- a/test-skeleton.c
00db10
+++ b/test-skeleton.c
00db10
@@ -368,8 +368,9 @@ main (int argc, char *argv[])
00db10
 
00db10
   /* Set timeout.  */
00db10
 #ifndef TIMEOUT
00db10
-  /* Default timeout is two seconds.  */
00db10
-# define TIMEOUT 2
00db10
+  /* Default timeout is twenty seconds.  Tests should normally complete faster
00db10
+     than this, but if they don't, that's abnormal (a bug) anyways.  */
00db10
+# define TIMEOUT 20
00db10
 #endif
00db10
   signal (SIGALRM, signal_handler);
00db10
   alarm (TIMEOUT * timeoutfactor);