libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 2ed00da9babc5608e8ed44e07f8d2067b4a4d8f5
parent c58fcc7391d0b6d1b493272d963c631d4f704c48
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sun, 22 Jan 2017 21:25:13 +0300

test_large_put: added verbosity

Diffstat:
Msrc/testcurl/test_large_put.c | 25+++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c @@ -47,6 +47,7 @@ static int oneone; static int incr_read; /* Use incremental read */ +static int verbose; /* Be verbose */ #define PUT_SIZE (256 * 1024) @@ -502,21 +503,37 @@ int main (int argc, char *const *argv) { unsigned int errorCount = 0; + unsigned int lastErr; oneone = has_in_name(argv[0], "11"); incr_read = has_in_name(argv[0], "_inc"); + verbose = has_param(argc, argv, "-v"); if (0 != curl_global_init (CURL_GLOBAL_WIN32)) return 99; put_buffer = alloc_init (PUT_SIZE); if (NULL == put_buffer) return 99; - errorCount += testPutInternalThread (); - errorCount += testPutThreadPerConn (); - errorCount += testPutThreadPool (); - errorCount += testPutExternal (); + lastErr = testPutInternalThread (); + if (verbose && 0 != lastErr) + fprintf (stderr, "Error during testing with internal thread with select().\n"); + errorCount += lastErr; + lastErr = testPutThreadPerConn (); + if (verbose && 0 != lastErr) + fprintf (stderr, "Error during testing with internal thread per connection with select().\n"); + errorCount += lastErr; + lastErr = testPutThreadPool (); + if (verbose && 0 != lastErr) + fprintf (stderr, "Error during testing with thread pool per connection with select().\n"); + errorCount += lastErr; + lastErr = testPutExternal (); + if (verbose && 0 != lastErr) + fprintf (stderr, "Error during testing with external select().\n"); + errorCount += lastErr; free (put_buffer); if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); + else if (verbose) + printf ("All checks passed successfully.\n"); curl_global_cleanup (); return (errorCount == 0) ? 0 : 1; }