aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
AgeCommit message (Collapse)Author
2015-07-14libtest: call PR_Cleanup() on exit if NSPR is usedKamil Dudka
This prevents valgrind from reporting possibly lost memory that NSPR uses for file descriptor cache and other globally allocated internal data structures. Reported-by: Štefan Kremeň
2015-06-25tests: Distribute CMakeLists.txt files in subdirectoriesRoger Leigh
2015-06-23test1531: verify POSTFIELDSIZE set after add_handleDaniel Stenberg
Following the fix made in 903b6e05565bf.
2015-06-09CURLOPT_OPENSOCKETFUNCTION: return error at onceDaniel Stenberg
When CURL_SOCKET_BAD is returned in the callback, it should be treated as an error (CURLE_COULDNT_CONNECT) if no other socket is subsequently created when trying to connect to a server. Bug: http://curl.haxx.se/mail/lib-2015-06/0047.html
2015-04-28CURLOPT_HEADEROPT: default to separateDaniel Stenberg
Make the HTTP headers separated by default for improved security and reduced risk for information leakage. Bug: http://curl.haxx.se/docs/adv_20150429.html Reported-by: Yehezkel Horowitz, Oren Souroujon
2015-03-16Bug #149: Deletion of unnecessary checks before calls of the function "free"Markus Elfring
The function "free" is documented in the way that no action shall occur for a passed null pointer. It is therefore not needed that a function caller repeats a corresponding check. http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first This issue was fixed by using the software Coccinelle 1.0.0-rc24. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2015-03-03libtest: fixed linker errors on msvcSergei Nikulov
Bug: https://github.com/bagder/curl/pull/144
2015-02-24lib530: make it less timing sensibleDaniel Stenberg
... by making sure the first request is completed before doing the remainder.
2015-02-03unit1600: unit test for Curl_ntlm_core_mk_nt_hashDaniel Stenberg
2015-01-07tests: make sure CRLFs can't be used in URLs passed to proxyDaniel Stenberg
Bug: http://curl.haxx.se/docs/adv_20150108B.html
2014-12-31lib1900.c: Fixed cppcheck errorJulien Nabet
lib1900.c:182: (style) Array index 'handlenum' is used before limits check Bug: https://github.com/bagder/curl/pull/133
2014-12-28test1509: Fixed compilation warningSteve Holme
lib1509.c:93:18: warning: conversion to 'long int' from 'size_t' may alter its value
2014-12-28test556: Fixed compilation warningSteve Holme
lib556.c:90: warning: conversion to 'unsigned int' from 'size_t' may alter its value
2014-12-28test1520: Fixed initial teething problemsSteve Holme
* Missing initialisation of upload status caused a seg fault * Missing data termination caused corrupt data to be uploaded * Data verification should be performed in <upload> element * Added missing recipient list cleanup
2014-12-28test1520: Fixed compilation errorsSteve Holme
2014-12-28tests: Added test for bug #1456Steve Holme
2014-12-09cookies: Improved OOM handling in cookiesDan Fandrich
This fixes the test 506 torture test. The internal cookie API really ought to be improved to separate cookie parsing errors (which may be ignored) with OOM errors (which should be fatal).
2014-11-10cmake: add ENABLE_THREADED_RESOLVER, rename ARESPeter Wu
Fix detection of the AsynchDNS feature which not just depends on pthreads support, but also on whether USE_POSIX_THREADS is set or not. Caught by test 1014. This patch adds a new ENABLE_THREADED_RESOLVER option (corresponding to --enable-threaded-resolver of autotools) which also needs a check for HAVE_PTHREAD_H. For symmetry with autotools, CURL_USE_ARES is renamed to ENABLE_ARES (--enable-ares). Checks that test for the availability actually use USE_ARES instead as that is the result of whether a-res is available or not (in practice this does not matter as CARES is marked as required package, but nevertheless it is better to write the intent). Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-10cmake: build libhostname for test suitePeter Wu
Used by some test cases via LD_PRELOAD in order to fake the host name. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-10tests: fix libhostname visibilityPeter Wu
I noticed that a patched cmake build would pass tests with a fake local hostname, but the autotools build skips them: got unexpected host name back, LD_PRELOAD failed It turns out that -fvisibility=hidden hides the symbol, and since the tests are not part of libcurl, it fails too. Just remove the LIBCURL guard. Broken since cURL 7.30 (commit 83a42ee20ea7fc25abb61c0b7ef56ebe712d7093, "curl.h: stricter CURL_EXTERN linkage decorations logic"). Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-05lib544.c: use duphandle for test 545Daniel Stenberg
To verify that curl_easy_duphandle() works fine on a handle that has gotten data stored with *_COPYPOSTFIELDS.
2014-10-16test545: make it not use a trailing zeroDaniel Stenberg
CURLOPT_COPYPOSTFIELDS with a given CURLOPT_POSTFIELDSIZE does not require a trailing zero of the data and by making sure this test doesn't use one we know it works (combined with valgrind).
2014-10-09Cmake: Got rid of setup_curl_dependenciesJakub Zakrzewski
There is no need for such function. Include_directories propagate by themselves and having a function with one simple link statement makes little sense.
2014-09-26test506: Fixed a couple of memory leaks in testDan Fandrich
2014-09-25CURLOPT_COOKIELIST: Added "RELOAD" commandYousuke Kimoto
2014-09-07Ensure progress.size_dl/progress.size_ul are always >= 0Brandon Casey
Historically the default "unknown" value for progress.size_dl and progress.size_ul has been zero, since these values are initialized implicitly by the calloc that allocates the curl handle that these variables are a part of. Users of curl that install progress callbacks may expect these values to always be >= 0. Currently it is possible for progress.size_dl and progress.size_ul to by set to a value of -1, if Curl_pgrsSetDownloadSize() or Curl_pgrsSetUploadSize() are passed a "size" of -1 (which a few places currently do, and a following patch will add more). So lets update Curl_pgrsSetDownloadSize() and Curl_pgrsSetUploadSize() so they make sure that these variables always contain a value that is >= 0. Updates test579 and test599. Signed-off-by: Brandon Casey <drafnel@gmail.com>
2014-07-24test1013.pl: GSS-Negotiate doesn't exist as a feature anymoreDaniel Stenberg
2014-07-24libtest: fixed duplicated line in MakefileSergey Nikulov
Bug: https://github.com/bagder/curl/pull/105
2014-07-23test1013.pl: remove SPNEGO/GSS-API tweaksDaniel Stenberg
No longer necessary after Michael Osipov's rework
2014-07-16test506: verify aa6884845168Daniel Stenberg
After the fixed cookie lock deadlock, this test now passes and it detects double-locking and double-unlocking of mutexes.
2014-06-18tests: Use CURLOPT_READDATA instead of the obsolete CURLOPT_INFILEDan Fandrich
2014-05-18test1014: GSS-API is only in curl-config. not in curlDaniel Stenberg
Follow-up to commit 121bcfee5d1. curl-config --features now lists GSS-API but it is not a listed feature in curl -V. This should probably be synchronized.
2014-05-09lib1506: make sure the transfers are not within the same msDaniel Stenberg
Just to make sure the test is properly repeatable. Bug: http://curl.haxx.se/mail/lib-2014-05/0081.html Reported-by: Henrik
2014-05-09libtests: add a wait_ms() functionDaniel Stenberg
This allows a libcurl test to portably sleep for a given number of milliseconds.
2014-05-05tests: Use standard libtest return codes when relevantDan Fandrich
2014-05-05test1513: Don't return an uninitialized variable on init failureDan Fandrich
2014-05-01test585: Fixed NULL pointer dereference in fopenDan Fandrich
2014-04-22tests: Fixed torture test for tests 1526 & 1527Dan Fandrich
2014-04-04PROXYHEADER: send these headers in "normal" proxy requests tooDaniel Stenberg
Updated the docs to clarify and the code accordingly, with test 1528 to verify: When CURLHEADER_SEPARATE is set and libcurl is asked to send a request to a proxy but it isn't CONNECT, then _both_ header lists (CURLOPT_HTTPHEADER and CURLOPT_PROXYHEADER) will be used since the single request is then made for both the proxy and the server.
2014-04-04CURLOPT_HEADEROPT: addedDaniel Stenberg
Modified the logic so that CURLOPT_HEADEROPT now controls if PROXYHEADER is actually used or not.
2014-04-04CURLOPT_PROXYHEADER: set headers for proxy-onlyDaniel Stenberg
Includes docs and new test cases: 1525, 1526 and 1527 Co-written-by: Vijay Panghal
2014-03-29lib1513: fix callback proto to silence warningDaniel Stenberg
2014-02-19lib1515.c: Fixed #include path in commit 647f83e809Steve Holme
2014-02-19test1515: fix compilation with msvcMaks Naumov
... or any other systems lacking a native snprintf
2014-02-14lib1515.c: Added support for Windows using the Sleep functionMarc Hoersken
2014-02-14testsuite: use binary output mode for custom curl test toolsMarc Hoersken
Do not try to convert line-endings to CRLF on Windows by setting stdout to binary mode, just like the curl tool does if --ascii is not specified. This should prevent corrupted stdout line-ending output like CRCRLF. In order to make the previously naive text-aware tests work with binary mode on Windows, text-mode is disabled for them if it is not actually part of the test case and line-endings are corrected.
2014-02-07lib1515.c: Fixed various compilation warningsSteve Holme
lib1515.c:38:26 warning: unused parameter 'curl' lib1515.c:38:81 warning: unused parameter 'ptr' lib1515.c:38:5 warning: no previous prototype for 'debug_callback' lib1515.c:46:5 warning: no previous prototype for 'do_one_request' lib1515.c:120:3 warning: ISO C90 forbids mixed declarations and code As well as some code policing such as white space and braces.
2014-02-06tests: add test for bug #1303 (dns cache timeout)Romulo A. Ceccon
Test-case 1515 reproduces bug #1303, where libcurl would incorrectly prune DNS entries added via CURLOPT_RESOLVE after the DNS_CACHE_TIMEOUT had expired.
2014-02-01test 500: workaround low timer resolution on WindowsMarc Hoersken
Since the timer resolution is lower, there are actually cases that the compared values are equal. Therefore we check for previous timestamps being greater than the current one instead.
2014-01-30tests: make the authorization retry tests pass the torture testsDan Fandrich