aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-09 07:35:13 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-09 07:35:13 +0000
commit52df865b8052b051364522e4be1ba2b7cd9f82fb (patch)
tree6cca2244988842c51fce6537d8f4f92be7a61c38
parent78e5722f4531168fc64acaa66ec8a0aecbc5b210 (diff)
downloadlibmicrohttpd-52df865b8052b051364522e4be1ba2b7cd9f82fb.tar.gz
libmicrohttpd-52df865b8052b051364522e4be1ba2b7cd9f82fb.zip
-check a few more error codes
-rw-r--r--src/testcurl/https/test_https_multi_daemon.c5
-rw-r--r--src/testcurl/https/test_tls_authentication.c5
-rw-r--r--src/testcurl/perf_get_concurrent.c10
-rw-r--r--src/testcurl/test_post_loop.c10
4 files changed, 26 insertions, 4 deletions
diff --git a/src/testcurl/https/test_https_multi_daemon.c b/src/testcurl/https/test_https_multi_daemon.c
index 4713f1ea..54efcabb 100644
--- a/src/testcurl/https/test_https_multi_daemon.c
+++ b/src/testcurl/https/test_https_multi_daemon.c
@@ -119,6 +119,9 @@ main (int argc, char *const *argv)
119 119
120 curl_global_cleanup (); 120 curl_global_cleanup ();
121 fclose (cert); 121 fclose (cert);
122 remove (ca_cert_file_name); 122 if (0 != remove (ca_cert_file_name))
123 fprintf (stderr,
124 "Failed to remove `%s'\n",
125 ca_cert_file_name);
123 return errorCount != 0; 126 return errorCount != 0;
124} 127}
diff --git a/src/testcurl/https/test_tls_authentication.c b/src/testcurl/https/test_tls_authentication.c
index cb80475c..d5a08ffa 100644
--- a/src/testcurl/https/test_tls_authentication.c
+++ b/src/testcurl/https/test_tls_authentication.c
@@ -98,6 +98,9 @@ main (int argc, char *const *argv)
98 print_test_result (errorCount, argv[0]); 98 print_test_result (errorCount, argv[0]);
99 99
100 curl_global_cleanup (); 100 curl_global_cleanup ();
101 remove (ca_cert_file_name); 101 if (0 != remove (ca_cert_file_name))
102 fprintf (stderr,
103 "Failed to remove `%s'\n",
104 ca_cert_file_name);
102 return errorCount != 0; 105 return errorCount != 0;
103} 106}
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c
index 15616ad5..b6c9259b 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -306,7 +306,15 @@ testExternalGet (int port)
306 if (MHD_YES != tret) tt = 1; 306 if (MHD_YES != tret) tt = 1;
307 tv.tv_sec = tt / 1000; 307 tv.tv_sec = tt / 1000;
308 tv.tv_usec = 1000 * (tt % 1000); 308 tv.tv_usec = 1000 * (tt % 1000);
309 select (max + 1, &rs, &ws, &es, &tv); 309 if (-1 == select (max + 1, &rs, &ws, &es, &tv))
310 {
311 if (EINTR == errno)
312 continue;
313 fprintf (stderr,
314 "select failed: %s\n",
315 strerror (errno));
316 break;
317 }
310 MHD_run (d); 318 MHD_run (d);
311 } 319 }
312 stop ("external select"); 320 stop ("external select");
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c
index e19941df..1d4657c6 100644
--- a/src/testcurl/test_post_loop.c
+++ b/src/testcurl/test_post_loop.c
@@ -396,7 +396,15 @@ testExternalPost ()
396 timeout = 0; /* terminate quickly... */ 396 timeout = 0; /* terminate quickly... */
397 tv.tv_sec = timeout / 1000; 397 tv.tv_sec = timeout / 1000;
398 tv.tv_usec = (timeout % 1000) * 1000; 398 tv.tv_usec = (timeout % 1000) * 1000;
399 select (max + 1, &rs, &ws, &es, &tv); 399 if (-1 == select (max + 1, &rs, &ws, &es, &tv))
400 {
401 if (EINTR == errno)
402 continue;
403 fprintf (stderr,
404 "select failed: %s\n",
405 strerror (errno));
406 break;
407 }
400 while (CURLM_CALL_MULTI_PERFORM == 408 while (CURLM_CALL_MULTI_PERFORM ==
401 curl_multi_perform (multi, &running)); 409 curl_multi_perform (multi, &running));
402 if (running == 0) 410 if (running == 0)