aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-10 16:40:27 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-10 16:40:27 +0100
commit91548850d961783a8f5b288c69ce83ecb89d3ddc (patch)
tree90d9bf46480d2275aeed5e339e3c81c3bf278e99 /src/testcurl/https
parent2123decd504e9fe024db7efba6d199b3457c7ad9 (diff)
downloadlibmicrohttpd-91548850d961783a8f5b288c69ce83ecb89d3ddc.tar.gz
libmicrohttpd-91548850d961783a8f5b288c69ce83ecb89d3ddc.zip
check system call return values in tests
Diffstat (limited to 'src/testcurl/https')
-rw-r--r--src/testcurl/https/test_empty_response.c8
-rw-r--r--src/testcurl/https/test_https_get_select.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c
index 2acc820f..5fd17bda 100644
--- a/src/testcurl/https/test_empty_response.c
+++ b/src/testcurl/https/test_empty_response.c
@@ -81,7 +81,7 @@ testInternalSelectGet ()
81 cbc.size = 2048; 81 cbc.size = 2048;
82 cbc.pos = 0; 82 cbc.pos = 0;
83 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_TLS | MHD_USE_INTERNAL_POLLING_THREAD, 83 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_TLS | MHD_USE_INTERNAL_POLLING_THREAD,
84 1082, NULL, NULL, &ahc_echo, "GET", 84 1082, NULL, NULL, &ahc_echo, "GET",
85 MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, 85 MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
86 MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, 86 MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem,
87 MHD_OPTION_END); 87 MHD_OPTION_END);
@@ -149,7 +149,11 @@ testInternalSelectGet ()
149 } 149 }
150 tv.tv_sec = 0; 150 tv.tv_sec = 0;
151 tv.tv_usec = 1000; 151 tv.tv_usec = 1000;
152 select (maxposixs + 1, &rs, &ws, &es, &tv); 152 if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))
153 {
154 if (EINTR != errno)
155 abort ();
156 }
153 curl_multi_perform (multi, &running); 157 curl_multi_perform (multi, &running);
154 if (running == 0) 158 if (running == 0)
155 { 159 {
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c
index 96c1e17e..024c52a4 100644
--- a/src/testcurl/https/test_https_get_select.c
+++ b/src/testcurl/https/test_https_get_select.c
@@ -101,7 +101,7 @@ testExternalGet (int flags)
101 cbc.size = 2048; 101 cbc.size = 2048;
102 cbc.pos = 0; 102 cbc.pos = 0;
103 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_TLS | flags, 103 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_TLS | flags,
104 1082, NULL, NULL, &ahc_echo, "GET", 104 1082, NULL, NULL, &ahc_echo, "GET",
105 MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem, 105 MHD_OPTION_HTTPS_MEM_KEY, srv_key_pem,
106 MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem, 106 MHD_OPTION_HTTPS_MEM_CERT, srv_self_signed_cert_pem,
107 MHD_OPTION_END); 107 MHD_OPTION_END);
@@ -109,7 +109,7 @@ testExternalGet (int flags)
109 return 256; 109 return 256;
110 110
111 if (curl_uses_nss_ssl() == 0) 111 if (curl_uses_nss_ssl() == 0)
112 aes256_sha = "rsa_aes_256_sha"; 112 aes256_sha = "rsa_aes_256_sha";
113 113
114 c = curl_easy_init (); 114 c = curl_easy_init ();
115 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1:1082/hello_world"); 115 curl_easy_setopt (c, CURLOPT_URL, "https://127.0.0.1:1082/hello_world");
@@ -175,7 +175,11 @@ testExternalGet (int flags)
175 } 175 }
176 tv.tv_sec = 0; 176 tv.tv_sec = 0;
177 tv.tv_usec = 1000; 177 tv.tv_usec = 1000;
178 select (maxposixs + 1, &rs, &ws, &es, &tv); 178 if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))
179 {
180 if (EINTR != errno)
181 abort ();
182 }
179 curl_multi_perform (multi, &running); 183 curl_multi_perform (multi, &running);
180 if (running == 0) 184 if (running == 0)
181 { 185 {