summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* libtest: remove lib1541 leftoversDaniel Stenberg2020-09-071-4/+0
| | | | | | Caused automake errors. Follow-up to 8ca54a03ea08a
* tests/libtests: remove test 1900 and 2033Daniel Stenberg2020-09-071-10/+2
| | | | | | We already remove the test files, now remove the libtest codes as well. Follow-up to e50a877df74
* CI/azure: add test number to title for display in analyticsMarc Hoersken2020-09-071-1/+3
| | | | | | | | | | To ease identification of tests the test number is added to the test case title in order to have it on the Azure DevOps Analytics pages and reports which currently do not show it. Bump test case revision to make Azure DevOps update titles. Closes #5927
* altsvc: clone setting in curl_easy_duphandlebagder/altsvc-duphandleDaniel Stenberg2020-09-063-3/+31
| | | | | | | | | | | | The cache content is not duplicated, like other caches, but the setting and specified file name are. Test 1908 is extended to verify this somewhat. Since the duplicated handle gets the same file name, the test unfortunately overwrites the same file twice (with different contents) which makes it hard to check automatically. Closes #5923
* test1541: remove since it is a known bugDaniel Stenberg2020-09-064-37/+10
| | | | | | | | | | | A shared connection cache is not thread-safe is a known issue. Stop testing this until we believe this issue is addressed. Reduces occasional test failures we don't care about. The test code in lib1541.c is left in git to allow us to restore it when we get to fix this. Closes #5922
* tests: remove pipelining testsDaniel Stenberg2020-09-0610-587/+18
| | | | | | | | | | Remove the tests 530, 584, 1900, 1901, 1902, 1903 and 2033. They were previously disabled. The Pipelining code was removed from curl in commit 2f44e94efb3df8e, April 2019. Closes #5921
* tests: Add tests for new --helpEmil Engler2020-09-045-1/+203
| | | | | | This commit is a part of "--help me if you can" Closes #5680
* hash: make it 'struct Curl_hash'Daniel Stenberg2020-09-023-5/+5
| | | | | | As internal global names should use captical C. Closes #5906
* llist: make it "struct Curl_llist"Daniel Stenberg2020-09-021-15/+15
| | | | | | As internal global names should use captical C. Closes #5906
* win32: drop support for WinSock version 1, require version 2Marc Hoersken2020-09-021-3/+3
| | | | | | | | | | | | | | | IPv6, telnet and now also the multi API require WinSock version 2 which is available starting with Windows 95. Therefore we think it is time to drop support for version 1. Reviewed-by: Marcel Raad Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Reviewed-by: Viktor Szakats Follow up to #5634 Closes #5854
* test971: show test mismatches "inline"Daniel Stenberg2020-09-022-1/+8
|
* tests/getpart: use MIME::Base64 instead of home-cookedDaniel Stenberg2020-08-291-6/+1
| | | | | | | | | | | | Since we already use the base64 package since a while back, we can just as well switch to that here too. It also happens to use the exact same function name, which otherwise causes a run-time warning. Reported-by: Marc Hörsken Fixes #5885 Closes #5887
* tests: add test1912 with typechecksJeroen Ooms2020-08-283-1/+117
| | | | | | Validates that gcc-typecheck macros match the new option type API. Closes #5873
* sockfilt: handle FD_CLOSE winsock event on write socketMarc Hoersken2020-08-281-3/+3
| | | | | | | | | Learn from the way Cygwin handles and maps the WinSock events to simulate correct and complete poll and select behaviour according to Richard W. Stevens Network Programming book. Follow up to #5867 Closes #5879
* buildconf: invoke 'autoreconf -fi' insteadDaniel Stenberg2020-08-271-9/+1
| | | | | | | The custom script isn't necessary anymore - but remains for simplicity and just invokes autoreconf. Closes #5853
* options: API for meta-data about easy optionsDaniel Stenberg2020-08-277-8/+131
| | | | | | | | | | | | | | | | const struct curl_easyoption *curl_easy_option_by_name(const char *name); const struct curl_easyoption *curl_easy_option_by_id (CURLoption id); const struct curl_easyoption * curl_easy_option_next(const struct curl_easyoption *prev); The purpose is to provide detailed enough information to allow for example libcurl bindings to get option information at run-time about what easy options that exist and what arguments they expect. Assisted-by: Jeroen Ooms Closes #5365
* git: ignore libtests in 3XXX areaEmil Engler2020-08-261-1/+1
| | | | | | | | Currently the file tests/libtest/lib3010 is not getting ignored by git. This fixes it by adding the 3XXX area to the according .gitignore file. Closes #5859
* lib1560: verify "redirect" to double-slash leading URLDaniel Stenberg2020-08-251-0/+8
| | | | Closes #5849
* curl: add --output-dirDaniel Stenberg2020-08-247-7/+321
| | | | | | | | Works with --create-dirs and with -J Add test 3008, 3009, 3011, 3012 and 3013 to verify. Closes #5637
* curl: support XDG_CONFIG_HOME to find .curlrcDaniel Stenberg2020-08-242-1/+60
| | | | | | | | | Added test433 to verify. Updated documentation. Reviewed-by: Jay Satiro Suggested-by: Eli Schwartz Fixes #5829 Closes #5837
* etag: save and use the full received contentsDaniel Stenberg2020-08-248-10/+72
| | | | | | | | | ... which makes it support weak tags and non-standard etags too! Added test case 347 to verify blank incoming ETag: Fixes #5610 Closes #5833
* CURLE_PROXY: new error codeDaniel Stenberg2020-08-244-4/+5
| | | | | | | | | | | | Failures clearly returned from a (SOCKS) proxy now causes this return code. Previously the situation was not very clear as what would be returned and when. In addition: when this error code is returned, an application can use CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then returns a value from the new 'CURLproxycode' enum. Closes #5770
* runtests: make cleardir() erase dot files tooDaniel Stenberg2020-08-231-1/+1
| | | | | | Because test cases might use dot files. Closes #5838
* runtests: avoid 'fail to start' repeated messages in attempt loopsDaniel Stenberg2020-08-211-14/+13
| | | | Closes #5834
* runtests: clear pid variables when failing to start a serverDaniel Stenberg2020-08-211-58/+28
| | | | | | | | | ... as otherwise the parent doesn't detect the failure and believe it actually worked to start. Reported-by: Christian Weisgerber Bug: https://curl.haxx.se/mail/lib-2020-08/0018.html Closes #5834
* libtest/Makefile.am: add -no-undefined for libstubgss for CygwinBrian Inglis2020-08-161-1/+4
| | | | | | | | | | | | copy the LDFLAGS approach for adding same option with `libhostname` in `libtest/Makefile.am`: - init `libstubgss_la_LDFLAGS_EXTRA` variable, - add option to variable inside conditional, - use variable in `libstubgss_la_LDFLAGS` Fixes #5819 Closes #5820
* test1140: compare stdoutDaniel Stenberg2020-08-152-5/+13
| | | | | | To make problems more immediately obvious when tests fail. Closes #5814
* copyright: update/correct the year range on a few filesDaniel Stenberg2020-08-142-2/+2
|
* CI/azure: fix test outcome values and use latest API versionMarc Hoersken2020-08-091-6/+6
| | | | | | | This makes sure that tests ignored or skipped are not shown just in the category "Other", but with their correct state. Closes #5796
* TLS naming: fix more Winssl and Darwinssl leftoversDaniel Stenberg2020-08-084-11/+9
| | | | | | | | | | | | | The CMake option is now called CMAKE_USE_SCHANNEL The winbuild flag is USE_SCHANNEL The CI jobs and build scripts only use the new names and the new name options Tests now require 'Schannel' (when necessary) Closes #5795
* runtests: run the DICT server on a random port numberDaniel Stenberg2020-08-072-46/+25
| | | | | | Removed support for -b (base port number) Closes #5783
* runtests: move the TELNET server to a dynamic portDaniel Stenberg2020-08-063-35/+30
| | | | | | | Rename the port variable to TELNETPORT to better match the existing pattern. Closes #5785
* runtests: move the smbserver to use a dynamic port numberDaniel Stenberg2020-08-051-32/+25
| | | | Closes #5782
* runtests: run the http2 tests on a random port numberDaniel Stenberg2020-08-051-16/+23
| | | | Closes #5779
* runtests: move the gnutls-serv tests to a dynamic portDaniel Stenberg2020-08-051-38/+26
| | | | | | Affects test 320, 321, 322 and 324. Closes #5778
* runtests: support dynamicly base64 encoded sections in testsDaniel Stenberg2020-08-0415-91/+77
| | | | | | | | | | | | | | | | | | This allows us to make test cases to use base64 at run-time and still use and verify information determined at run-time, such as the IMAP test server's port number in test 842. This change makes 12 tests run again that basically never ran since we moved to dynamic port numbers. ftpserver.pl is adjusted to load test instructions and test number from the preprocessed test file. FILEFORMAT.md now documents the new base64 encoding syntax. Reported-by: Marcel Raad Fixes #5761 Closes #5775
* test1908: treat file as textMarcel Raad2020-08-031-1/+1
| | | | | | Fixes the line endings on Windows. Closes https://github.com/curl/curl/pull/5767
* TrackMemory tests: ignore realloc and free in getenv.cMarcel Raad2020-08-032-0/+4
| | | | | | These are only called for WIN32. Closes https://github.com/curl/curl/pull/5767
* tests/FILEFORMAT.md: mention %HTTP2PORTDaniel Stenberg2020-08-031-0/+1
|
* runtests.pl: treat LibreSSL and BoringSSL as OpenSSLMarcel Raad2020-08-021-1/+1
| | | | | | | This makes the tests that require the OpenSSL feature also run for those two compatible libraries. Closes https://github.com/curl/curl/pull/5762
* multi_remove_handle: close unused connect-only connectionsMarc Aldorasi2020-08-011-0/+6
| | | | | | | | | Previously any connect-only connections in a multi handle would be kept alive until the multi handle was closed. Since these connections cannot be re-used, they can be marked for closure when the associated easy handle is removed from the multi handle. Closes #5749
* checksrc: invoke script with -D to find .checksrc properDaniel Stenberg2020-08-011-1/+1
| | | | | | | | | | Without the -D command line option, checksrc.pl won't know which directory to load the ".checksrc" file from when building out of the source tree. Reported-by: Marcel Raad Fixes #5715 Closes #5755
* tests/sshserver.pl: fix compatibility with OpenSSH for WindowsMarc Hoersken2020-07-311-0/+5
| | | | Follow up to #5721
* url: fix CURLU and location followingJay Satiro2020-07-304-2/+130
| | | | | | | | | | | Prior to this change if the user set a URL handle (CURLOPT_CURLU) it was incorrectly used for the location follow, resulting in infinite requests to the original location. Reported-by: sspiri@users.noreply.github.com Fixes https://github.com/curl/curl/issues/5709 Closes https://github.com/curl/curl/pull/5713
* checksrc: ban gmtime/localtimeDaniel Stenberg2020-07-282-0/+2
| | | | | | | | | They're not thread-safe so they should not be used in libcurl code. Explictly enabled when deemed necessary and in examples and tests Reviewed-by: Nicolas Sterchele Closes #5732
* getinfo: reset retry-after value in initinfoNicolas Sterchele2020-07-274-2/+129
| | | | | | | | | - Avoid re-using retry_after value from preceding request - Add libtest 3010 to verify Reported-by: joey-l-us on github Fixes #5661 Closes #5672
* mprintf: Fix stack overflowsTobias Stoeckmann2020-07-271-0/+11
| | | | | | | | | | | | | | | | | | | | | Stack overflows can occur with precisions for integers and floats. Proof of concepts: - curl_mprintf("%d, %.*1$d", 500, 1); - curl_mprintf("%d, %+0500.*1$f", 500, 1); Ideally, compile with -fsanitize=address which makes this undefined behavior a bit more defined for debug purposes. The format strings are valid. The overflows occur due to invalid arguments. If these arguments are variables with contents controlled by an attacker, the function's stack can be corrupted. Also see CVE-2016-9586 which partially fixed the float aspect. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Closes https://github.com/curl/curl/pull/5722
* util: silence conversion warningsMarcel Raad2020-07-192-2/+2
| | | | | | | | | | timeval::tv_usec might be a 32-bit integer and timespec::tv_nsec might be a 64-bit integer. This is the case when building for recent macOS versions, for example. Just treat tv_usec as an int, which should hopefully always be sufficient on systems with `HAVE_CLOCK_GETTIME_MONOTONIC`. Closes https://github.com/curl/curl/pull/5695
* test1139: make it display the difference on test failuresbagder/test1119Daniel Stenberg2020-07-142-3/+9
|
* test1119: verify stdout in the testDaniel Stenberg2020-07-142-0/+9
| | | | | | | So that failures will be displayed in the terminal, as it makes test failures visually displayed easier and faster. Closes #5644