summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Split non-portable part off test 1133Marcel Raad2018-08-113-7/+105
| | | | | | | | | Split off testing file names with double quotes into new test 1158. Disable it for MSYS using a precheck as it doesn't support file names with double quotes (but Cygwin does, for example). Fixes https://github.com/curl/curl/issues/2796 Closes https://github.com/curl/curl/pull/2854
* CURLINFO_SIZE_UPLOAD: fix missing counter updateDaniel Stenberg2018-08-114-2/+145
| | | | | | | | Adds test 1522 for verification. Reported-by: cjmsoregan Fixes #2847 Closes #2864
* lib1502: fix memory leak in torture testDaniel Stenberg2018-08-101-0/+2
| | | | | | Reported-by: Marcel Raad Fixes #2861 Closes #2863
* test1531: Add timeoutRikard Falkeborn2018-08-091-1/+10
| | | | | | | Previously, the macro TEST_HANG_TIMEOUT was unused, but since there is looping going on, we might as well add timing instead of removing it. Closes #2853
* test1540: Remove unused macro TEST_HANG_TIMEOUTRikard Falkeborn2018-08-091-2/+0
| | | | | | | The macro has never been used, and it there is not really any place where it would make sense to add timing checks. Closes #2852
* ssl: set engine implicitly when a PKCS#11 URI is providedAnderson Toshiyuki Sasaki2018-08-081-0/+3
| | | | | | | | | | | This allows the use of PKCS#11 URI for certificates and keys without setting the corresponding type as "ENG" and the engine as "pkcs11" explicitly. If a PKCS#11 URI is provided for certificate, key, proxy_certificate or proxy_key, the corresponding type is set as "ENG" if not provided and the engine is set to "pkcs11" if not provided. Acked-by: Nikos Mavrogiannopoulos Closes #2333
* CMake: Respect BUILD_SHARED_LIBSRuslan Baratov2018-08-081-1/+1
| | | | | | | | | | Use standard CMake variable BUILD_SHARED_LIBS instead of introducing custom option CURL_STATICLIB. Use '-DBUILD_SHARED_LIBS=%SHARED%' in appveyor.yml. Reviewed-by: Sergei Nikulov Closes #2755
* test1307: disabledDaniel Stenberg2018-08-021-0/+2
| | | | | | | | Turns out that since we're using the native fnmatch function now when available, and they simply disagree on a huge number of test patterns that make it hard to test this function like this... Fixes #2825
* general: fix printf specifiersRikard Falkeborn2018-08-011-1/+1
| | | | Closes #2818
* sws: handle EINTR when calling select()Michael Kaufmann2018-07-291-11/+14
| | | | Closes https://github.com/curl/curl/pull/2808
* test1157: follow-up to 35ecffb9Daniel Stenberg2018-07-291-0/+3
| | | | | Ignore the user-agent line. Pointed-out-by: Marcel Raad
* tests/http_pipe.py: Use /usr/bin/env to find pythonMichael Kaufmann2018-07-291-1/+1
|
* test1157: test -H from empty fileDaniel Stenberg2018-07-282-1/+56
| | | | Verifies bugfix #2797
* test320: treat curl320.out file as binaryMarcel Raad2018-07-221-1/+1
| | | | | | | Otherwise, LF line endings are converted to CRLF on Windows, but no conversion is done for the reply, so the test case fails. Closes https://github.com/curl/curl/pull/2776
* tests: fixes for Windows line endlingsMarcel Raad2018-07-212-2/+2
| | | | | | Set mode="text" when line endings depend on the system representation. Closes https://github.com/curl/curl/pull/2772
* test214: disable MSYS2's POSIX path conversion for URLMarcel Raad2018-07-211-0/+4
| | | | | | | By default, the MSYS2 bash converts all backslashes to forward slashes in URLs. Disable this with MSYS2_ARG_CONV_EXCL for the test to pass. Ref https://github.com/msys2/msys2/wiki/Porting#filesystem-namespaces
* test1143: disable MSYS2's POSIX path conversionMarcel Raad2018-07-201-0/+5
| | | | | | | | | By default, the MSYS2 bash interprets http:/%HOSTIP:%HTTPPORT/want/1143 as a POSIX file list and converts it to a Windows file list. Disable this with MSYS2_ARG_CONV_EXCL for the test to pass. Ref https://github.com/msys2/msys2/wiki/Porting#filesystem-namespaces Closes https://github.com/curl/curl/pull/2765
* CMake: Update scripts to use consistent styleRuslan Baratov2018-07-173-7/+7
| | | | | Closes #2727 Reviewed-by: Sergei Nikulov
* test1422: add required file featureMarcel Raad2018-07-141-0/+1
| | | | | | | | | | | curl configured with --enable-debug --disable-file currently complains on test1422: Info: Protocol "file" not supported or disabled in libcurl Make test1422 dependend on enabled FILE protocol to fix this. Fixes https://github.com/curl/curl/issues/2741 Closes https://github.com/curl/curl/pull/2742
* multi: always do the COMPLETED procedure/stateDaniel Stenberg2018-07-111-5/+10
| | | | | | | | | | | It was previously erroneously skipped in some situations. libtest/libntlmconnect.c wrongly depended on wrong behavior (that it would get a zero timeout) when no handles are "running" in a multi handle. That behavior is no longer present with this fix. Now libcurl will always return a -1 timeout when all handles are completed. Closes #2733
* conn: remove the boolean 'inuse' fieldDaniel Stenberg2018-07-111-6/+0
| | | | ... as the usage needs to be counted.
* multi: fix crash due to dangling entry in connect-pending listJavier Blazquez2018-06-234-2/+104
| | | | | Fixes #2677 Closes #2679
* travis: run more tests for coverage checkDaniel Stenberg2018-06-171-2/+2
| | | | | | ... run a few more tortured based and run all tests event-based. Closes #2664
* multi: fix memory leak when stopped during name resolveDaniel Stenberg2018-06-164-3/+59
| | | | | | | | | | | | When the application just started the transfer and then stops it while the name resolve in the background thread hasn't completed, we need to wait for the resolve to complete and then cleanup data accordingly. Enabled test 1553 again and added test 1590 to also check when the host name resolves successfully. Detected by OSS-fuzz. Closes #1968
* runtests.pl: remove debug leftover from bb9a340c73f3Daniel Stenberg2018-06-151-1/+0
|
* runtests: support variables in <strippart>Daniel Stenberg2018-06-122-2/+7
| | | | | | | | ... and make use of that to make 1455 work better without using a fixed local port number. Fixes #2649 Closes #2650
* test 46: make test pass after 2025Bernhard M. Wiedemann2018-06-121-4/+4
| | | | | | | | | shifting the expiry date to 2037 for now to be before the possibly problematic year 2038 similar in spirit to commit e6293cf8764e9eecb Closes #2646
* cppcheck: fix warningsMarian Klymov2018-06-1119-77/+55
| | | | | | | | | | | | | - Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
* tests/libtests/Makefile.am: Add lib1521.c to CLEANFILESRikard Falkeborn2018-06-061-0/+2
| | | | | | This removes the generated lib1521.c when running make clean. Closes #2633
* tests/libtest: Add lib1521 to nodist_SOURCESRikard Falkeborn2018-06-063-5/+6
| | | | | | | | | | | Since 467da3af0, lib1521.c is generated instead of checked in. According to the commit message, the intention was to remove it from the tarball as well. However, it is still present when running make dist. To remove it, add it to nodist_lib1521_SOURCES. This also means there is no need for the manually added dist-rule in the Makefile. Also update CMakelists.txt to handle the fact that we now may have nodist_SOURCES.
* spelling fixesViktor Szakats2018-06-033-9/+9
| | | | | | Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
* CURLOPT_RESOLVE: always purge old entry firstAlibek.Jorajev2018-06-016-4/+255
| | | | | | If there's an existing entry using the selected name. Closes #2622
* fnmatch: use the system one if availableDaniel Stenberg2018-06-011-18/+80
| | | | | | | | | | | | | If configure detects fnmatch to be available, use that instead of our custom one for FTP wildcard pattern matching. For standard compliance, to reduce our footprint and to use already well tested and well exercised code. A POSIX fnmatch behaves slightly different than the internal function for a few test patterns currently and the macOS one yet slightly different. Test case 1307 is adjusted for these differences. Closes #2626
* tests/libtest/.gitignore: follow-up fix to ignore lib5* tooDaniel Stenberg2018-05-311-1/+1
|
* tests: update .gitignore for libtestsRikard Falkeborn2018-05-311-6/+2
| | | | Closes #2624
* option: disallow username in URLBjörn Stenberg2018-05-312-1/+35
| | | | | | | Adds CURLOPT_DISALLOW_USERNAME_IN_URL and --disallow-username-in-url. Makes libcurl reject URLs with a username in them. Closes #2340
* fnmatch: insist on escaped bracket to matchDaniel Stenberg2018-05-281-4/+13
| | | | | | | | | | | | A non-escaped bracket ([) is for a character group - as documented. It will *not* match an individual bracket anymore. Test case 1307 updated accordingly to match. Problem detected by OSS-Fuzz, although this fix is probably not a final fix for the notorious timeout issues. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8525 Closes #2614
* httpauth: add support for Bearer tokensLinus Lewandowski2018-05-242-0/+58
| | | | Closes #2102
* cmake: set -d postfix for debug builds if not specifiedSergei Nikulov2018-05-242-12/+0
| | | | | | using -DCMAKE_DEBUG_POSTFIX explicitly fixes #2121, obsoletes #2384
* http resume: skip body if http code 416 (range error) is ignored.Patrick Monnerat2018-05-225-1/+252
| | | | | | | | | | | | This avoids appending error data to already existing good data. Test 92 is updated to match this change. New test 1156 checks all combinations of --range/--resume, --fail, Content-Range header and http status code 200/416. Fixes #1163 Reported-By: Ithubg on github Closes #2578
* checksrc: make sure sizeof() is used *with* parenthesesDaniel Stenberg2018-05-216-10/+10
| | | | | | ... and unify the source code to adhere. Closes #2563
* curl: show headers in boldDaniel Stenberg2018-05-2115-17/+6
| | | | | | | | | | | | | | | | | | The feature is only enabled if the output is believed to be a tty. -J: There's some minor differences and improvements in -J handling, as now J should work with -i and it actually creates a file first using the initial name and then *renames* that to the one found in Content-Disposition (if any). -i: only shows headers for HTTP transfers now (as documented). Previously it would also show for pieces of the transfer that were HTTP (for example when doing FTP over a HTTP proxy). -i: now shows trailers as well. Previously they were not shown at all. --libcurl: the CURLOPT_HEADER is no longer set, as the header output is now done in the header callback.
* curl_fnmatch: only allow two asterisks for matchingDaniel Stenberg2018-05-181-4/+0
| | | | | | | | | | | | | The previous limit of 5 can still end up in situation that takes a very long time and consumes a lot of CPU. If there is still a rare use case for this, a user can provide their own fnmatch callback for a version that allows a larger set of wildcards. This commit was triggered by yet another OSS-Fuzz timeout due to this. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8369 Closes #2587
* stub_gssapi: fix numerous 'unused parameter' warningsDaniel Stenberg2018-05-181-2/+50
| | | | follow-up to d9e92fd9fd1d
* getinfo: add microsecond precise timers for various intervalsPhilip Prindeville2018-05-171-18/+32
| | | | | | | | | | | | | | | | | Provide a set of new timers that return the time intervals using integer number of microseconds instead of floats. The new info names are as following: CURLINFO_APPCONNECT_TIME_T CURLINFO_CONNECT_TIME_T CURLINFO_NAMELOOKUP_TIME_T CURLINFO_PRETRANSFER_TIME_T CURLINFO_REDIRECT_TIME_T CURLINFO_STARTTRANSFER_TIME_T CURLINFO_TOTAL_TIME_T Closes #2495
* tests/libtest/Makefile: Do not unconditionally add gcc-specific flagsDagobert Michelsen2018-05-161-1/+1
| | | | | | The warning flag leads e.g. Sun Studio compiler to bail out. Closes #2576
* tests: Fix format specifiersRikard Falkeborn2018-05-148-13/+13
|
* cookies: do not take cookie name as a parameterPatrick Monnerat2018-05-132-1/+55
| | | | | | | | | | | | RFC 6265 section 4.2.1 does not set restrictions on cookie names. This is a follow-up to commit 7f7fcd0. Also explicitly check proper syntax of cookie name/value pair. New test 1155 checks that cookie names are not reserved words. Reported-By: anshnd at github Fixes #2564 Closes #2566
* tests: provide 'manual' as a feature to optionally requireDaniel Stenberg2018-04-293-0/+21
| | | | | | | | | ... and make test 1026 rely on that feature so that --disable-manual builds don't cause test failures. Reported-by: Max Dymond and Anders Roxell Fixes #2533 Closes #2540
* checksrc: force indentation of lines after an elseDaniel Gustafsson2018-04-271-1/+1
| | | | | | | | This extends the INDENTATION case to also handle 'else' statements and require proper indentation on the following line. Also fixes the offending cases found in the codebase. Closes #2532