Ver Fonte

Even more reduced number of test iterations on W32 to avoid ports exhaust

Evgeny Grin (Karlson2k) há 5 anos atrás
pai
commit
aee82048c2

+ 8 - 0
src/testcurl/perf_get.c

@@ -62,7 +62,15 @@
  * How many rounds of operations do we do for each
  * test?
  */
+#if MHD_CPU_COUNT > 8
+#ifndef _WIN32
+#define ROUNDS (1 + (30000 / 12) / MHD_CPU_COUNT)
+#else /* _WIN32 */
+#define ROUNDS (1 + (3000 / 12) / MHD_CPU_COUNT)
+#endif /* _WIN32 */
+#else
 #define ROUNDS 500
+#endif
 
 /**
  * Do we use HTTP 1.1?

+ 1 - 1
src/testcurl/perf_get_concurrent.c

@@ -59,7 +59,7 @@
 #ifndef _WIN32
 #define ROUNDS (1 + (30000 / 12) / MHD_CPU_COUNT)
 #else /* _WIN32 */
-#define ROUNDS (1 + (10000 / 12) / MHD_CPU_COUNT)
+#define ROUNDS (1 + (3000 / 12) / MHD_CPU_COUNT)
 #endif /* _WIN32 */
 #else
 #define ROUNDS 500

+ 4 - 0
src/testcurl/test_add_conn.c

@@ -1119,6 +1119,7 @@ main (int argc, char *const *argv)
   verbose = ! has_param (argc, argv, "-q") || has_param (argc, argv, "--quiet");
   if (cleanup_test)
   {
+#ifndef _WIN32
     /* Find system limit for number of open FDs. */
 #if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
     sys_max_fds = sysconf (_SC_OPEN_MAX);
@@ -1135,6 +1136,9 @@ main (int argc, char *const *argv)
       if (2 > CLEANUP_MAX_DAEMONS (sys_max_fds))
         return 77; /* Multithreaded test cannot be run */
     }
+#else  /* _WIN32 */
+    sys_max_fds = 120; /* W32 has problems with ports exhaust */
+#endif /* _WIN32 */
   }
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 99;