aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
AgeCommit message (Collapse)Author
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
2014-01-29tests: make a few lib15?? tests pass the OOM torture testsDan Fandrich
2014-01-29lib1900: make the test pass the OOM torture testsDan Fandrich
2014-01-22test1514: Got rid of a non-const initializer C99ismDan Fandrich
2014-01-20test1514: added - no more negative Content-Length (HTTP POST)Cédric Deltheil
This covers changes from commit afd288b2.
2014-01-04Updated copyright year for recent changesSteve Holme
2014-01-03test1513: added - verify early progress callback return failDaniel Stenberg
Verify the change brought in commit 8e11731653061. It makes sure that returning a failure from the progress callback even very early results in the correct return code.
2013-12-31mprintf: Replaced internal usage of FORMAT_OFF_T and FORMAT_OFF_TUSteve Holme
Following commit 0aafd77fa4c6f2, replaced the internal usage of FORMAT_OFF_T and FORMAT_OFF_TU with the external versions that we expect API programmers to use. This negates the need for separate definitions which were subtly different under different platforms/compilers.
2013-11-15lib1507.c: Added missing set of CURLOPT_UPLOAD optionSteve Holme
Although this option should have already been set, the SMTP module can now download information from and send instructional commands to, an SMTP server, requiring the option to be set in order to perform a mail transfer.
2013-09-02lib1512.c: Fixed compilation warningSteve Holme
An enumerated type is mixed with another type. ...as well as a small coding style error.
2013-09-01Killed warning 'res' might be used uninitialized.Guenter Knauf
2013-08-08global dns cache: didn't work [regression]Daniel Stenberg
CURLOPT_DNS_USE_GLOBAL_CACHE broke in commit c43127414d89ccb (been broken since the libcurl 7.29.0 release). While this option has been documented as deprecated for almost a decade and nobody even reported this bug, it should remain functional. Added test case 1512 to verify
2013-07-22libtest: fix data type of some *_setopt() 'long' argumentsYang Tse
2013-07-17cmake: Fix for MSVC2010 project generationSergei Nikulov
Fixed issue with static build for MSVC2010. After some investigation I've discovered known issue http://public.kitware.com/Bug/view.php?id=11240 When .rc file is linked to static lib it fails with following linker error LINK : warning LNK4068: /MACHINE not specified; defaulting to X86 file.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' Fix add target property /MACHINE: for MSVC generation. Also removed old workarounds - it caused errors during msvc build. Bug: http://curl.haxx.se/mail/lib-2013-07/0046.html
2013-07-11test 1511: fix enumerated type mixed with another typeYang Tse
2013-07-01lib506.c: Fixed possible use of uninitialized variablesMarc Hoersken
2013-06-17test506: verify that CURLOPT_COOKIELIST takes share lockBenjamin Gilbert
It doesn't right now: http://curl.haxx.se/bug/view.cgi?id=1215
2013-06-12lib1900: use tutil_tvnow instead of gettimeofdaySergei Nikulov
Makes it build on windows
2013-06-06lib1500: remove bad checkDaniel Stenberg
After curl_multi_wait() returns, this test checked that we got exactly one file descriptor told to read from, but we cannot be sure that is true. curl_multi_wait() will sometimes return earlier without any file descriptor to handle, just just because it is a suitable time to call *perform(). This problem showed up with commit 29bf0598. Bug: http://curl.haxx.se/mail/lib-2013-06/0029.html Reported-by: Fabian Keil
2013-05-08libtest: gitignore more binary filesDaniel Stenberg
2013-04-22tests: add test1511 to check timecond clean-upAlessandro Ghedini
Verifies the timecond fix in commit c49ed0b6c0f
2013-04-15Add extra libs for lib1900 and lib2033 test programsPaul Howarth
These are needed in cases where clock_gettime is used, from librt.
2013-04-04lib1509.c: fix compiler warningsYang Tse
2013-04-04easy: Fix the broken CURLOPT_MAXCONNECTS optionLinus Nielsen Feltzing
Copy the CURLOPT_MAXCONNECTS option to CURLMOPT_MAXCONNECTS in curl_easy_perform(). Bug: http://curl.haxx.se/bug/view.cgi?id=1212 Reported-by: Steven Gu
2013-03-27test1509: verify proxy header response headers countDaniel Stenberg
Modified sws to support and use custom CONNECT responses instead of the previously naive hard-coded version. Made the HTTP test server able to extract test case number from the host name in a CONNECT request by finding the number after the last dot. It makes 'machine.moo.123' use test case 123. Adapted a larger amount of tests to the new <connect> style. Bug: http://curl.haxx.se/bug/view.cgi?id=1204 Reported by: Martin Jansen
2013-03-20lib1900.c: fix compilation warningSteve Holme
warning: declaration of 'time' shadows a global declaration
2013-03-15tests: add #96 #558 and #1330Yang Tse
These verfy that the 'memory tracking' subsystem is actually doing its job when using curl tool (#96), a test in libtest (#558) and also a unit test (#1330), in order to prevent regressions in this functionallity.
2013-03-13Multiple pipelines and limiting the number of connections.Linus Nielsen Feltzing
Introducing a number of options to the multi interface that allows for multiple pipelines to the same host, in order to optimize the balance between the penalty for opening new connections and the potential pipelining latency. Two new options for limiting the number of connections: CURLMOPT_MAX_HOST_CONNECTIONS - Limits the number of running connections to the same host. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished, so we can reuse the connection. CURLMOPT_MAX_TOTAL_CONNECTIONS - Limits the number of connections in total. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished. The free connection will then be reused, if possible, or closed if the pending handle can't reuse it. Several new options for pipelining: CURLMOPT_MAX_PIPELINE_LENGTH - Limits the pipeling length. If a pipeline is "full" when a connection is to be reused, a new connection will be opened if the CURLMOPT_MAX_xxx_CONNECTIONS limits allow it. If not, the handle will be put in a pending state until a connection is ready (either free or a pipe got shorter). CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a transfer with a content length that is larger than this. CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a chunk larger than this. CURLMOPT_PIPELINING_SITE_BL - A blacklist of hosts that don't allow pipelining. CURLMOPT_PIPELINING_SERVER_BL - A blacklist of server types that don't allow pipelining. See the curl_multi_setopt() man page for details.
2013-03-13test509: libcurl initialization with memory callbacks and actual usageYang Tse
2013-03-12curl.h: stricter CURL_EXTERN linkage decorations logicYang Tse
No API change involved. Info: http://curl.haxx.se/mail/lib-2013-02/0234.html
2013-03-09Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibilityYang Tse
2013-03-08configure: use XC_LIBTOOL for portability across libtool versionsYang Tse
2013-02-10Fix NULL pointer reference when closing an unused multi handle.Linus Nielsen Feltzing
2013-02-08DONE: consider callback-aborted transfers prematureDaniel Stenberg
This bug report properly identified that when doing SMTP and aborting the transfer with a callback, it must be considered aborted prematurely by the code to avoid QUIT etc to be attempted as that would cause a hang. The new test case 1507 verifies this behavior. Reported by: Patricia Muscalu Bug: http://curl.haxx.se/bug/view.cgi?id=1184
2013-02-05CURLMOPT_MAXCONNECTS: restore functionalityLinus Nielsen Feltzing
When a connection is no longer used, it is kept in the cache. If the cache is full, the oldest idle connection is closed. If no connection is idle, the current one is closed instead.
2013-01-20Makefile.inc: fix $(top_srcdir) not allowed in _SOURCES variablesYang Tse
2013-01-17always-multi: always use non-blocking internalsDaniel Stenberg
Remove internal separated behavior of the easy vs multi intercace. curl_easy_perform() is now using the multi interface itself. Several minor multi interface quirks and bugs have been fixed in the process. Much help with debugging this has been provided by: Yang Tse
2013-01-15build: use per-target '_CPPFLAGS' for those currently using defaultYang Tse
Automake documents that doing this will make it choose a different name for intermediate object files even when sharing source files across targets of same Makefile.am. Up to automake 1.13.1 target's intermediate object files were placed in the build subdirectory of the target. We depended on this, probably undocumented behavior, to achieve same behavior as if a per-target flag had been specified when building targets that actually belong to different Makefile.am files. It seems automake 1.13.2 is going to break behavior mentioned above. So, lets use a documented behavior in order to achieve same purpose, across automake versions, no matter where automake wishes to place intermediate object files. Our build targets that already were using a per-target '_CFLAGS' or '_CPPFLAGS' need no 'fixing', these were already 'fixed'. The only Makefile.am or Makefile.in files in libcurl's source tree touched by this 'fix' are tests/libtest/Makefile.inc and tests/unit/Makefile.inc.
2013-01-15tests/libtest/Makefile.inc: sort build targetsYang Tse
2013-01-09build: fix circular header inclusion with other packagesYang Tse
This commit renames lib/setup.h to lib/curl_setup.h and renames lib/setup_once.h to lib/curl_setup_once.h. Removes the need and usage of a header inclusion guard foreign to libcurl. [1] Removes the need and presence of an alarming notice we carried in old setup_once.h [2] ---------------------------------------- 1 - lib/setup_once.h used __SETUP_ONCE_H macro as header inclusion guard up to commit ec691ca3 which changed this to HEADER_CURL_SETUP_ONCE_H, this single inclusion guard is enough to ensure that inclusion of lib/setup_once.h done from lib/setup.h is only done once. Additionally lib/setup.h has always used __SETUP_ONCE_H macro to protect inclusion of setup_once.h even after commit ec691ca3, this was to avoid a circular header inclusion triggered when building a c-ares enabled version with c-ares sources available which also has a setup_once.h header. Commit ec691ca3 exposes the real nature of __SETUP_ONCE_H usage in lib/setup.h, it is a header inclusion guard foreign to libcurl belonging to c-ares's setup_once.h The renaming this commit does, fixes the circular header inclusion, and as such removes the need and usage of a header inclusion guard foreign to libcurl. Macro __SETUP_ONCE_H no longer used in libcurl. 2 - Due to the circular interdependency of old lib/setup_once.h and the c-ares setup_once.h header, old file lib/setup_once.h has carried back from 2006 up to now days an alarming and prominent notice about the need of keeping libcurl's and c-ares's setup_once.h in sync. Given that this commit fixes the circular interdependency, the need and presence of mentioned notice is removed. All mentioned interdependencies come back from now old days when the c-ares project lived inside a curl subdirectory. This commit removes last traces of such fact.
2013-01-06Revert changes relative to lib/*.[ch] recent renamingYang Tse
This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
2013-01-03build: make use of 93 lib/*.c renamed filesYang Tse
93 *.c source files renamed to use our standard naming scheme. This change affects 77 files in libcurl's source tree.