summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* uni1620: fix bad free in OOMbagder/libtest-memleakDaniel Stenberg2019-12-121-0/+2
|
* uni1609: fix mem-leak in OOMDaniel Stenberg2019-12-121-9/+20
|
* unit1607: fix mem-leak in OOMDaniel Stenberg2019-12-121-12/+18
|
* lib1559: fix mem-leak in OOMDaniel Stenberg2019-12-121-8/+4
|
* lib1557: fix mem-leak in OOMDaniel Stenberg2019-12-121-3/+3
|
* runtests: introduce --shallow to reduce huge torture testsDaniel Stenberg2019-12-112-4/+41
| | | | | | | | | | | | When set, shallow mode limits runtests -t to make no more than NUM fails per test case. If more are found, it will randomly discard entries until the number is right. The random seed can also be set. This is particularly useful when running MANY tests as then most torture failures will already fail the same functions over and over and make the total operation painfully tedious. Closes #4699
* tests: make it possible to set executable extensionsMarc Hoersken2019-12-094-17/+36
| | | | | | | | | | | | | | | | | This enables the use of Windows Subsystem for Linux (WSL) to run the testsuite against Windows binaries while using Linux servers. This commit introduces the following environment variables: - CURL_TEST_EXE_EXT: set the executable extension for all components - CURL_TEST_EXE_EXT_TOOL: set it for the curl tool only - CURL_TEST_EXE_EXT_SSH: set it for the SSH tools only Later testcurl.pl could be adjusted to make use of those variables. - CURL_TEST_EXE_EXT_SRV: set it for the test servers only (This is one of several commits to support use of WSL for the tests.) Closes https://github.com/curl/curl/pull/3899
* tests: fix permissions of ssh keys in WSLMarc Hoersken2019-12-091-0/+3
| | | | | | | | | Keys created on Windows Subsystem for Linux (WSL) require it for some reason. (This is one of several commits to support use of WSL for the tests.) Ref: https://github.com/curl/curl/pull/3899
* tests: use \r\n for log messages in WSLMarc Hoersken2019-12-091-1/+9
| | | | | | | | Bash in Windows Subsystem for Linux (WSL) requires it for some reason. (This is one of several commits to support use of WSL for the tests.) Ref: https://github.com/curl/curl/pull/3899
* conncache: fix multi-thread use of shared connection cacheDaniel Stenberg2019-12-091-0/+6
| | | | | | | | | It could accidentally let the connection get used by more than one thread, leading to double-free and more. Reported-by: Christopher Reid Fixes #4544 Closes #4557
* etag: allow both --etag-compare and --etag-save in same cmdlineDaniel Stenberg2019-12-052-1/+62
| | | | | Fixes #4669 Closes #4678
* test342: make it return a 304 as the tag matchesDaniel Stenberg2019-12-051-3/+2
|
* curl_setup: disable IPv6 resolver without `getaddrinfo`Marcel Raad2019-12-031-3/+3
| | | | | | | | | | Also, use `CURLRES_IPV6` only for actual DNS resolution, not for IPv6 address support. This makes it possible to connect to IPv6 literals by setting `ENABLE_IPV6` even without `getaddrinfo` support. It also fixes the CMake build when using the synchronous resolver without `getaddrinfo` support. Closes https://github.com/curl/curl/pull/4662
* build: Disable Visual Studio warning "conditional expression is constant"Jay Satiro2019-12-014-36/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Disable warning C4127 "conditional expression is constant" globally in curl_setup.h for when building with Microsoft's compiler. This mainly affects building with the Visual Studio project files found in the projects dir. Prior to this change the cmake and winbuild build systems already disabled 4127 globally for when building with Microsoft's compiler. Also, 4127 was already disabled for all build systems in the limited circumstance of the WHILE_FALSE macro which disabled the warning specifically for while(0). This commit removes the WHILE_FALSE macro and all other cruft in favor of disabling globally in curl_setup. Background: We have various macros that cause 0 or 1 to be evaluated, which would cause warning C4127 in Visual Studio. For example this causes it: #define Curl_resolver_asynch() 1 Full behavior is not clearly defined and inconsistent across versions. However it is documented that since VS 2015 Update 3 Microsoft has addressed this somewhat but not entirely, not warning on while(true) for example. Prior to this change some C4127 warnings occurred when I built with Visual Studio using the generated projects in the projects dir. Closes https://github.com/curl/curl/pull/4658
* curl: two new command line options for etagsMaros Priputen2019-11-284-2/+180
| | | | | | | | --etag-compare and --etag-save Suggested-by: Paul Hoffman Fixes #4277 Closes #4543
* dist: add error-codes.plMarcel Raad2019-11-261-1/+1
| | | | | | | Follow-up to commit 74f441c6d31. This should fix test 1175 when run via the daily source tarballs. Closes https://github.com/curl/curl/pull/4638
* multi: add curl_multi_wakeup()Gergely Nagy2019-11-259-3/+485
| | | | | | | | | | | | This commit adds curl_multi_wakeup() which was previously in the TODO list under the curl_multi_unblock name. On some platforms and with some configurations this feature might not be available or can fail, in these cases a new error code (CURLM_WAKEUP_FAILURE) is returned from curl_multi_wakeup(). Fixes #4418 Closes #4608
* test1175: verify symbols-in-versions and libcurl-errors.3 in syncDaniel Stenberg2019-11-223-1/+106
| | | | Closes #4628
* include: make CURLE_HTTP3 use a new error codeDaniel Stenberg2019-11-211-2/+3
| | | | | | | | | To avoid potential issues with error code reuse. Reported-by: Christoph M. Becker Assisted-by: Dan Fandrich Fixes #4601 Closes #4627
* doh: improced both encoding and decodingNiall2019-11-161-27/+91
| | | | | | | | | | | Improved estimation of expected_len and updated related comments; increased strictness of QNAME-encoding, adding error detection for empty labels and names longer than the overall limit; avoided treating DNAME as unexpected; updated unit test 1655 with more thorough set of proofs and tests Closes #4598
* curl: fix -T globbingDaniel Stenberg2019-11-144-0/+223
| | | | | | | | | | | | Regression from e59371a4936f8 (7.67.0) Added test 490, 491 and 492 to verify the functionality. Reported-by: Kamil Dudka Reported-by: Anderson Sasaki Fixes #4588 Closes #4591
* quiche: reject headers in the wrong orderDaniel Stenberg2019-11-121-1/+1
| | | | | | | | Pseudo header MUST come before regular headers or cause an error. Reported-by: Cynthia Coan Fixes #4571 Closes #4584
* CURL-DISABLE: initial docs for the CURL_DISABLE_* definesDaniel Stenberg2019-11-121-0/+37
| | | | | | | | | | The disable-scan script used in test 1165 is extended to also verify that the docs cover all used defines and all defines offered by configure. Reported-by: SLDiggie on github Fixes #4545 Closes #4587
* test1558: use double slash after file:Marcel Raad2019-11-101-5/+1
| | | | | | | Classic MinGW / MSYS 1 doesn't support `MSYS2_ARG_CONV_EXCL`, so this test unnecessarily failed when using `file:/` instead of `file:///`. Closes https://github.com/curl/curl/pull/4554
* strerror: Fix an error looking up some Windows error stringsJay Satiro2019-11-091-1/+2
| | | | | | | | | | | | | | | | | | - Use FORMAT_MESSAGE_IGNORE_INSERTS to ignore format specifiers in Windows error strings. Since we are not in control of the error code we don't know what information may be needed by the error string's format specifiers. Prior to this change Windows API error strings which contain specifiers (think specifiers like similar to printf specifiers) would not be shown. The FormatMessage Windows API call which turns a Windows error code into a string could fail and set error ERROR_INVALID_PARAMETER if that error string contained a format specifier. FormatMessage expects a va_list for the specifiers, unless inserts are ignored in which case no substitution is attempted. Ref: https://devblogs.microsoft.com/oldnewthing/20071128-00/?p=24353
* test1560: require IPv6 for IPv6 aware URL parsingDaniel Stenberg2019-11-081-0/+1
| | | | | | | | | The URL parser function can't reject a bad IPv6 address properly when curl was built without IPv6 support. Reported-by: Marcel Raad Fixes #4556 Closes #4572
* certs/Server-localhost-lastSAN-sv: regenerate with sha256Marcel Raad2019-11-028-189/+191
| | | | | | | | All other certificates were regenerated in commit ba782baac30, but this one was missed. Fixes test3001 on modern systems. Closes https://github.com/curl/curl/pull/4551
* copyrights: update all copyright notices to 2019 on files changed this yearVilhelm Prytz2019-11-0212-12/+12
| | | | Closes #4547
* url: make Curl_close() NULLify the pointer tooDaniel Stenberg2019-10-301-2/+2
| | | | | | | This is the common pattern used in the code and by a unified approach we avoid mistakes. Closes #4534
* test1591: fix spelling of http featureMarcel Raad2019-10-241-1/+1
| | | | | | The test never got run because the feature name is `http` in lowercase. Closes https://github.com/curl/curl/pull/4520
* conn-reuse: requests wanting NTLM can reuse non-NTLM connectionsDaniel Stenberg2019-10-232-1/+64
| | | | | | | | Added test case 338 to verify. Reported-by: Daniel Silverstone Fixes #4499 Closes #4514
* tests: add missing proxy featuresMarcel Raad2019-10-232-0/+2
|
* tests: use %FILE_PWD for file:// URLsMarcel Raad2019-10-2119-19/+19
| | | | | | | This way, we always have exactly one slash after the host name, making the tests pass when curl is compiled with the MSYS GCC. Closes https://github.com/curl/curl/pull/4512
* tests: add `connect to non-listen` keywordsMarcel Raad2019-10-212-0/+2
| | | | | | These tests try to connect to ports nothing is listening on. Closes https://github.com/curl/curl/pull/4511
* runtests: get textaware info from curl instead of perlMarcel Raad2019-10-201-1/+1
| | | | | | | | | | | The MSYS system on Windows can run the test suite for curl built with any toolset. When built with the MSYS GCC, curl uses Unix line endings, while it uses Windows line endings when built with the MinGW GCC, and `^O` reports 'msys' in both cases. Use the curl executable itself to determine the line endings instead, which reports 'x86_64-pc-msys' when built with the MSYS GCC. Closes https://github.com/curl/curl/pull/4506
* test1162: disable MSYS2's POSIX path conversionMarcel Raad2019-10-171-0/+4
| | | | | This avoids MSYS2 converting the backslasb in the URL to a slash, causing the test to fail.
* url: normalize CURLINFO_EFFECTIVE_URLDaniel Stenberg2019-10-164-2/+113
| | | | | | | | | | | | | | | | The URL extracted with CURLINFO_EFFECTIVE_URL was returned as given as input in most cases, which made it not get a scheme prefixed like before if the URL was given without one, and it didn't remove dotdot sequences etc. Added test case 1907 to verify that this now works as intended and as before 7.62.0. Regression introduced in 7.62.0 Reported-by: Christophe Dervieux Fixes #4491 Closes #4493
* tests: line ending fixes for WindowsMarcel Raad2019-10-1619-19/+19
| | | | | | Mark some files as text. Closes https://github.com/curl/curl/pull/4490
* tests: use proxy featureMarcel Raad2019-10-15133-5/+287
| | | | | | This makes the tests succeed when using --disable-proxy. Closes https://github.com/curl/curl/pull/4488
* smbserver: fix Python 3 compatibilityMarcel Raad2019-10-131-2/+5
| | | | | | Python 2's `ConfigParser` module is spelled `configparser` in Python 3. Closes https://github.com/curl/curl/pull/4484
* tests: use port 2 instead of 60000 for a safer non-listening portDaniel Stenberg2019-10-093-3/+3
| | | | ... when the tests want "connection refused".
* docs: document it as --no-progress-meter instead of the reverseDaniel Stenberg2019-10-091-1/+3
| | | | | | | | Follow-up to 93373a960c3bb4 Reported-by: infinnovation-dev on github Fixes #4474 Closes #4475
* curl: ensure HTTP 429 triggers --retryStian Soiland-Reyes2019-10-052-2/+2
| | | | | | | | This completes #3794. Also make sure the new tests from #4195 are enabled Closes #4465
* urlapi: fix use-after-free bugDaniel Stenberg2019-10-032-1/+80
| | | | | | | | | | | Follow-up from 2c20109a9b5d04 Added test 663 to verify. Reported by OSS-Fuzz Bug: https://crbug.com/oss-fuzz/17954 Closes #4453
* redirect: when following redirects to an absolute URL, URL encode itDaniel Stenberg2019-10-022-0/+76
| | | | | | | | ... to make it handle for example (RFC violating) embeded spaces. Reported-by: momala454 on github Fixes #4445 Closes #4447
* curl: create easy handles on-demand and not ahead of timeDaniel Stenberg2019-10-021-2/+2
| | | | | | | | | | This should again enable crazy-large download ranges of the style [1-10000000] that otherwise easily ran out of memory starting in 7.66.0 when this new handle allocating scheme was introduced. Reported-by: Peter Sumatra Fixes #4393 Closes #4438
* git: add tests/server/disabled to .gitignoreEmil Engler2019-09-301-0/+1
| | | | Closes #4441
* altsvc: accept quoted ma and persist valuesDaniel Stenberg2019-09-302-2/+12
| | | | | | As mandated by the spec. Test 1654 is extended to verify. Closes #4443
* cookies: using a share with cookies shouldn't enable the cookie engineDaniel Stenberg2019-09-284-59/+117
| | | | | | | | | | | | | | | | | The 'share object' only sets the storage area for cookies. The "cookie engine" still needs to be enabled or activated using the normal cookie options. This caused the curl command line tool to accidentally use cookies without having been told to, since curl switched to using shared cookies in 7.66.0. Test 1166 verifies Updated test 506 Fixes #4429 Closes #4434
* FTP: add test for FTPFILE_NOCWD: Avoid redundant CWDsZenju2019-09-274-2/+228
| | | | | | Add libtest 661 Closes #4417