aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-12-27runtests: Fixed detection of Unix Sockets featureSteve Holme
...following change in curl --version output.
2014-12-26code/docs: Use Unix rather than UNIX to avoid use of the trademarkSteve Holme
Use Unix when generically writing about Unix based systems as UNIX is the trademark and should only be used in a particular product's name.
2014-12-26sockfilt.c: Reduce the number of individual memory allocationsMarc Hoersken
Merge multiple internal arrays into one, even if some variables will not not be used. They are all created with the number of file descriptors as their size. Also fix possible thread handle leak in CloseHandle-loop.
2014-12-26sockfilt.c: Replace 100ms sleep with thread throttleMarc Hoersken
Improves performance of test cases 574 and 575 by 50%. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. http://msdn.microsoft.com/library/windows/desktop/ms686307.aspx
2014-12-22sshserver.pl: clarify and streamline variable namesMarc Hoersken
2014-12-21sockfilt.c: use non-Ex functions that are available before WinXPMarc Hoersken
It was initially reported by Guenter that GetFileSizeEx requires (_WIN32_WINNT >= 0x0500) to be true.
2014-12-21tests: use Cygwin-style paths in SSH, SSHD and SFTP config filesMarc Hoersken
Second patch to enable Windows support using Cygwin-based OpenSSH. Tested with CopSSH 5.0.0 free edition using an msys shell on Windows 7.
2014-12-21tests: support spaces in paths to SSH, SSHD and SFTP binariesMarc Hoersken
First patch to enable Windows support using Cygwin-based OpenSSH.
2014-12-19secureserver.pl: clean up formatting of config and fix verbose outputMarc Hoersken
Verbose output was not matching the actual configuration file, because FIPS and Windows conditions were ignored.
2014-12-19secureserver.pl: update Windows detection and fix path conversionMarc Hoersken
2014-12-19secureserver.pl: make OpenSSL CApath and cert absolute path valuesMarc Hoersken
Recent stunnel versions (5.08) seem to have trouble with relative paths on Windows. This turns the relative paths into absolute ones.
2014-12-10sws.c: Fixed 'rc' may be used uninitialized warningDan Fandrich
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-12-06sws.c: Fixed compilation warningSteve Holme
sws.c:2191 warning: 'rc' may be used uninitialized in this function
2014-12-04fix gdb libtool invocation pathStefan Bühler
2014-12-04libcurl: add UNIX domain sockets supportPeter Wu
The ability to do HTTP requests over a UNIX domain socket has been requested before, in Apr 2008 [0][1] and Sep 2010 [2]. While a discussion happened, no patch seems to get through. I decided to give it a go since I need to test a nginx HTTP server which listens on a UNIX domain socket. One patch [3] seems to make it possible to use the CURLOPT_OPENSOCKETFUNCTION function to gain a UNIX domain socket. Another person wrote a Go program which can do HTTP over a UNIX socket for Docker[4] which uses a special URL scheme (though the name contains cURL, it has no relation to the cURL library). This patch considers support for UNIX domain sockets at the same level as HTTP proxies / IPv6, it acts as an intermediate socket provider and not as a separate protocol. Since this feature affects network operations, a new feature flag was added ("unix-sockets") with a corresponding CURL_VERSION_UNIX_SOCKETS macro. A new CURLOPT_UNIX_SOCKET_PATH option is added and documented. This option enables UNIX domain sockets support for all requests on the handle (replacing IP sockets and skipping proxies). A new configure option (--enable-unix-sockets) and CMake option (ENABLE_UNIX_SOCKETS) can disable this optional feature. Note that I deliberately did not mark this feature as advanced, this is a feature/component that should easily be available. [0]: http://curl.haxx.se/mail/lib-2008-04/0279.html [1]: http://daniel.haxx.se/blog/2008/04/14/http-over-unix-domain-sockets/ [2]: http://sourceforge.net/p/curl/feature-requests/53/ [3]: http://curl.haxx.se/mail/lib-2008-04/0361.html [4]: https://github.com/Soulou/curl-unix-socket Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04tests: add two HTTP over UNIX socket testsPeter Wu
test1435: a simple test that checks whether a HTTP request can be performed over the UNIX socket. The hostname/port are interpreted by sws and should be ignored by cURL. test1436: test for the ability to do two requests to the same host, interleaved with one to a different hostname. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04tests: add HTTP UNIX socket server testing supportPeter Wu
The variable `$ipvnum` can now contain "unix" besides the integers 4 and 6 since the variable. Functions which receive this parameter have their `$port` parameter renamed to `$port_or_path` to support a path to the UNIX domain socket (as a "port" is only meaningful for TCP). Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04sws: try to remove socket and retry bindPeter Wu
If sws is killed it might leave a stale socket file on the filesystem which would cause an EADDRINUSE error. After this patch, it is checked whether the socket is really stale and if so, the socket file gets removed and another bind is executed. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04sws: add UNIX domain socket supportPeter Wu
This extends sws with a --unix-socket option which causes the port to be ignored (as the server now listens on the path specified by --unix-socket). This feature will be available in the following patch that enables checking for UNIX domain socket support. Proxy support (CONNECT) is not considered nor tested. It does not make sense anyway, first connecting through a TCP proxy, then let that TCP proxy connect to a UNIX socket. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04sws: restrict TCP_NODELAY to IP socketsPeter Wu
TCP_NODELAY does not make sense for Unix sockets, so enable it only if the socket is using IP. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-03sws.c: Fixed compilation warning when IPv6 is disabledSteve Holme
sws.c:69: warning: comma at end of enumerator list
2014-11-30sws: move away from IPv4/IPv4-only assumptionPeter Wu
Instead of depending the socket domain type on use_ipv6, specify the domain type (AF_INET / AF_INET6) as variable. An enum is used here with switch to avoid compiler warnings in connect_to, complaining that rc is possibly undefined (which is not possible as socket_domain is always set). Besides abstracting the socket type, make the debugging messages be independent on IP (introduce location_str which points to "port XXXXX"). Rename "ipv_inuse" to "socket_type" and tighten the scope (main). Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-30curl tool: Enable support for the SMB protocolBill Nagel
This patch enables SMB/CIFS support in the curl command-line tool.
2014-11-29tests: Disable test 1013 until SMB is fully addedSteve Holme
2014-11-28runtests.pl: fix startup of IPv6 serversPeter Wu
Commit curl-7_23_1-143-g8218064 changed the parameter of responsive_http_server to accept types other than IPv6 (converting from a boolean to a string), but only considered the lower-case "ipv6" and not the "IPv6" variant. This caused all servers to start in IPv4 mode instead. This patch converts the remaining cases to "ipv6". While not strictly necessary for the run*server variants, these got also converted for consistency and to prevent future errors. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-28runtests.pl: fix warning message, remove duplicate valuePeter Wu
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-26tests: Added SMTP with --crlf test caseSteve Holme
2014-11-25testcurl: bump the version of this script!Daniel Stenberg
2014-11-25testcurl: skip reading the setup file if given enough cmdline infoDaniel Stenberg
This makes it much easier to run multiple tests in the same directory, just altering the command lines used.
2014-11-24SSL: Add PEM format support for public key pinningmoparisthebest
2014-11-22runtests.pl: Re-aligned feature support commentsSteve Holme
2014-11-22runtests.pl: Use Kerberos and SPNEGO as proxies for the crypto featureSteve Holme
In addition to NTLM, use Kerberos and SPNEGO as proxies to the crypto feature. ...and converted tab characters, from commit 4b4e8a5853, to spaces.
2014-11-22runtests.pl: Added support for SPNEGOSteve Holme
2014-11-22runtests.pl: Added Kerberos detectionSteve Holme
2014-11-22runtests.pl: Added GSS-API detectionSteve Holme
2014-11-21FILEFORMAT: Added SSPI, GSS-API and Kerberos to the features listSteve Holme
2014-11-21FILEFORMAT: Added test requires feature not present informationSteve Holme
Such as !SSPI as we do for the NTLM and Digest tests.
2014-11-20test1801: first real http2 test caseDaniel Stenberg
2014-11-20sws: initial tiny steps toward http2 supportDaniel Stenberg
2014-11-20FILEFORMAT: mention the new upgrade supportDaniel Stenberg
2014-11-20test1800: first plain-text http2 test caseDaniel Stenberg
Verifies the upgrade request, but gets a plain 1.1 response
2014-11-13test22: expand a backtick commandPeter Wu
This is the only user of the backtick operator in the command. As the commands will soon not be executed by a shell anymore (but by perl), replace the command with its output. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-10symbol-scan.pl: do not require autotoolsPeter Wu
Makes test1119 pass when building with cmake. configurehelp.pm is generated by configure (autotools). As cmake does not provide a separate variable for the C preprocessor, default to cpp. Before commit ef24ecde68a5f577a7f0f423a767620f09a0ab16 ("symbol-scan: use configure script knowledge about how to run the C preprocessor"), this tool would also use 'cpp'. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
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-10tests: fix memleak in server/resolve.cPeter Wu
This makes LeakSanitizer happy. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-06test552: Don't run HTTP digest tests for SSPI based buildsDan Fandrich
Technical difficulties prevented this from going into the previous commit.
2014-11-06tests: Don't run HTTP digest tests for SSPI based buildsSteve Holme
Added !SSPI to the features list of the HTTP digest tests, as SSPI based builds now use the Windows SSPI messaging API rather than the internal functions, and we can't control the random numbers that get used as part of the digest.