aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https')
-rw-r--r--src/testcurl/https/Makefile.am6
-rw-r--r--src/testcurl/https/test_https_get_parallel.c9
-rw-r--r--src/testcurl/https/test_https_get_parallel_threads.c9
3 files changed, 22 insertions, 2 deletions
diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am
index e1a5f402..4053e536 100644
--- a/src/testcurl/https/Makefile.am
+++ b/src/testcurl/https/Makefile.am
@@ -4,6 +4,8 @@ if USE_COVERAGE
4 AM_CFLAGS = --coverage 4 AM_CFLAGS = --coverage
5endif 5endif
6 6
7CPU_COUNT_DEF = -DCPU_COUNT=$(CPU_COUNT)
8
7AM_CPPFLAGS = \ 9AM_CPPFLAGS = \
8 -I$(top_srcdir)/src/include \ 10 -I$(top_srcdir)/src/include \
9 -I$(top_srcdir)/src/microhttpd \ 11 -I$(top_srcdir)/src/microhttpd \
@@ -59,6 +61,8 @@ test_tls_options_LDADD = \
59test_https_get_parallel_SOURCES = \ 61test_https_get_parallel_SOURCES = \
60 test_https_get_parallel.c \ 62 test_https_get_parallel.c \
61 tls_test_common.c 63 tls_test_common.c
64test_https_get_parallel_CPPFLAGS = \
65 $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
62test_https_get_parallel_CFLAGS = \ 66test_https_get_parallel_CFLAGS = \
63 $(PTHREAD_CFLAGS) $(AM_CFLAGS) 67 $(PTHREAD_CFLAGS) $(AM_CFLAGS)
64test_https_get_parallel_LDADD = \ 68test_https_get_parallel_LDADD = \
@@ -77,6 +81,8 @@ test_empty_response_LDADD = \
77test_https_get_parallel_threads_SOURCES = \ 81test_https_get_parallel_threads_SOURCES = \
78 test_https_get_parallel_threads.c \ 82 test_https_get_parallel_threads.c \
79 tls_test_common.c 83 tls_test_common.c
84test_https_get_parallel_threads_CPPFLAGS = \
85 $(AM_CPPFLAGS) $(CPU_COUNT_DEF)
80test_https_get_parallel_threads_CFLAGS = \ 86test_https_get_parallel_threads_CFLAGS = \
81 $(PTHREAD_CFLAGS) $(AM_CFLAGS) 87 $(PTHREAD_CFLAGS) $(AM_CFLAGS)
82test_https_get_parallel_threads_LDADD = \ 88test_https_get_parallel_threads_LDADD = \
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c
index 9ac330f0..eafc3d26 100644
--- a/src/testcurl/https/test_https_get_parallel.c
+++ b/src/testcurl/https/test_https_get_parallel.c
@@ -33,6 +33,13 @@
33#include <gcrypt.h> 33#include <gcrypt.h>
34#include "tls_test_common.h" 34#include "tls_test_common.h"
35 35
36#if defined(CPU_COUNT) && (CPU_COUNT+0) < 4
37#undef CPU_COUNT
38#endif
39#if !defined(CPU_COUNT)
40#define CPU_COUNT 4
41#endif
42
36extern const char srv_key_pem[]; 43extern const char srv_key_pem[];
37extern const char srv_self_signed_cert_pem[]; 44extern const char srv_self_signed_cert_pem[];
38 45
@@ -94,7 +101,7 @@ test_parallel_clients (void * cls, const char *cipher_suite,
94 int curl_proto_version) 101 int curl_proto_version)
95{ 102{
96 int i; 103 int i;
97 int client_count = 3; 104 int client_count = (CPU_COUNT - 1);
98 void *client_thread_ret; 105 void *client_thread_ret;
99 pthread_t client_arr[client_count]; 106 pthread_t client_arr[client_count];
100 struct https_test_data client_args = 107 struct https_test_data client_args =
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c
index 4e27370b..334276a3 100644
--- a/src/testcurl/https/test_https_get_parallel_threads.c
+++ b/src/testcurl/https/test_https_get_parallel_threads.c
@@ -35,6 +35,13 @@
35#include <gcrypt.h> 35#include <gcrypt.h>
36#include "tls_test_common.h" 36#include "tls_test_common.h"
37 37
38#if defined(CPU_COUNT) && (CPU_COUNT+0) < 4
39#undef CPU_COUNT
40#endif
41#if !defined(CPU_COUNT)
42#define CPU_COUNT 4
43#endif
44
38extern const char srv_key_pem[]; 45extern const char srv_key_pem[];
39extern const char srv_self_signed_cert_pem[]; 46extern const char srv_self_signed_cert_pem[];
40 47
@@ -94,7 +101,7 @@ test_parallel_clients (void *cls, const char *cipher_suite,
94 int curl_proto_version) 101 int curl_proto_version)
95{ 102{
96 int i; 103 int i;
97 int client_count = 3; 104 int client_count = (CPU_COUNT - 1);
98 void *client_thread_ret; 105 void *client_thread_ret;
99 pthread_t client_arr[client_count]; 106 pthread_t client_arr[client_count];
100 struct https_test_data client_args = 107 struct https_test_data client_args =