summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* build: fixed build for systems with select() in unistd.hHarry Sintonen2020-03-311-0/+2
| | | | Closes #5169
* cleanup: insert newline after if() conditionsDaniel Stenberg2020-03-302-7/+11
| | | | | Our code style mandates we put the conditional block on a separate line. These mistakes are now detected by the updated checksrc.
* dist: add tests/version-scan.pl to tarballDaniel Stenberg2020-03-291-1/+1
| | | | | | ... used in test 1177. Follow-up to a97d826f6de3
* test1177: verify that all the CURL_VERSION_ bits are documentedDaniel Stenberg2020-03-293-1/+92
|
* writeout_json: Fix data type issuesMichael Kaufmann2020-03-271-1/+1
| | | | | | | | | | | | | | | Load long values correctly (e.g. for http_code). Use curl_off_t (not long) for: - size_download (CURLINFO_SIZE_DOWNLOAD_T) - size_upload (CURLINFO_SIZE_UPLOAD_T) The unit for these values is bytes/second, not microseconds: - speed_download (CURLINFO_SPEED_DOWNLOAD_T) - speed_upload (CURLINFO_SPEED_UPLOAD_T) Fixes #5131 Closes #5152
* sockfilt: add logmsg output to select_ws_wait_thread on WindowsMarc Hoersken2020-03-261-1/+10
| | | | | | | Assisted-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #5086
* copyright: fix out-of-date copyright ranges and missing headersDaniel Stenberg2020-03-24106-88/+468
| | | | | | | | | Reported by the new script 'scripts/copyright.pl'. The script has a regex whitelist for the files that don't need copyright headers. Removed three (mostly usesless) README files from docs/ Closes #5141
* getinfo: provide CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE overrideDaniel Stenberg2020-03-221-1/+2
| | | | | | | To let debug-builds return fake values, like in test 970. Ref: #5131 Closes #5136
* test970: improve the testDaniel Stenberg2020-03-221-19/+7
| | | | | | | | | - send more data to make problems more obvious - don't start the data with minus, it makes diffs harder to read - skip the headers in the stdout comparison - save to a file name to also verify 'filename_effective' Ref: #5131
* tests: add test 430, 431 and 432 to verify the --config fixDaniel Stenberg2020-03-204-0/+298
| | | | Verify the fixes in 4e0b4fee4
* test2100: fix static port instead of dynamic value being usedMarc Hoersken2020-03-201-0/+0
|
* test970: fix static ip:port instead of dynamic values being usedMarc Hoersken2020-03-201-1/+1
|
* tests: make Python-based servers compatible with Python 2 and 3Marc Hoersken2020-03-196-22/+53
| | | | | | | | | | | | | | | | Update smbserver.py and negtelnetserver.py to be compatible with Python 3 while staying backwards-compatible to support Python 2. Fix string encoding and handling of echoed and transferred data. Tested with both Python 2.7.17 and Python 3.7.7 Reported-by: Daniel Stenberg Assisted-by: Kamil Dudka Reviewed-by: Marcel Raad Fixes #5104 Closes #5110
* schannel: add "best effort" revocation check optionJohannes Schindelin2020-03-183-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement new option CURLSSLOPT_REVOKE_BEST_EFFORT and --ssl-revoke-best-effort to allow a "best effort" revocation check. A best effort revocation check ignores errors that the revocation check was unable to take place. The reasoning is described in detail below and discussed further in the PR. --- When running e.g. with Fiddler, the schannel backend fails with an unhelpful error message: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. Sadly, many enterprise users who are stuck behind MITM proxies suffer the very same problem. This has been discussed in plenty of issues: https://github.com/curl/curl/issues/3727, https://github.com/curl/curl/issues/264, for example. In the latter, a Microsoft Edge developer even made the case that the common behavior is to ignore issues when a certificate has no recorded distribution point for revocation lists, or when the server is offline. This is also known as "best effort" strategy and addresses the Fiddler issue. Unfortunately, this strategy was not chosen as the default for schannel (and is therefore a backend-specific behavior: OpenSSL seems to happily ignore the offline servers and missing distribution points). To maintain backward-compatibility, we therefore add a new flag (`CURLSSLOPT_REVOKE_BEST_EFFORT`) and a new option (`--ssl-revoke-best-effort`) to select the new behavior. Due to the many related issues Git for Windows and GitHub Desktop, the plan is to make this behavior the default in these software packages. The test 2070 was added to verify this behavior, adapted from 310. Based-on-work-by: georgeok <giorgos.n.oikonomou@gmail.com> Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Closes https://github.com/curl/curl/pull/4981
* test 970: verify --write-out '%{json}'Daniel Stenberg2020-03-172-1/+78
| | | | | | | | | | | Makes curl_easy_getinfo() of "variable" numerical content instead return the number set in the env variable `CURL_TIME`. Makes curl_version() of "variable" textual content. This guarantees a stable version string which can be tested against. Environment variable `CURL_VERSION` defines the content. Assisted-by: Mathias Gumz
* DISABLED: disable test 323Daniel Stenberg2020-03-171-0/+3
| | | | | | | | | | | | | The test uses SRP to "a server not supporting it" but modern stunnel versions will silently accept it and remain happy. The test is therefore faulty. I haven't figured out how to make stunnel explicitly reject SRP-using connects. Reported-by: Marc Hörsken Fixes #5105 Closes #5113
* tests: fix verification of stdout in test 1452 due to newlineMarc Hoersken2020-03-151-1/+3
| | | | Fixes test1452:41:1: error: missing </stdout> tag before </verify>
* tests/README: add note about manually installing python-impacketMarc Hoersken2020-03-151-0/+9
| | | | Follow up to 4be2560
* tests: remove python_dependencies for smbserver from our treeMarc Hoersken2020-03-1516-18137/+13
| | | | | | | | | | | | Users of the SMB tests will have to install impacket manually. Reasoning: our in-tree version of impacket was quite outdated and only compatible with Python 2 which is already end-of-life. Upgrading to Python 3 and a compatible impacket version would require to import additional Python-only and CPython-extension dependencies. This would have hindered portability enormously. Closes #5094
* server/getpart: make the "XML-parser" stricterDaniel Stenberg2020-03-133-12/+21
| | | | | | | | | When extracting a <section> <part> and there's no </part> before </section>, this now outputs an error and returns a wrong string to make users spot the mistake. Ref: #5070 Closes #5071
* impacket: some more Python 3 code compatibility updatesMarc Hoersken2020-03-133-13/+18
| | | | This makes smbserver load on Python 3, but still not work completely.
* smbserver: pin Python version to 2 since we are not yet 3 compatibleMarc Hoersken2020-03-131-1/+1
| | | | | | | | Even though the existing code can be fixed to run on Python 3, the tests will fail due to the Unicode transition the protocol is invalid. Follow up to ee63837 Closes #5085
* cleanup: fix some text/comment typosViktor Szakats2020-03-123-4/+4
| | | | Closes #5087
* smbserver: fix Python version specific ConfigParser importMarc Hoersken2020-03-122-5/+5
| | | | | Follow up to ee63837 and 8c7c4a6 Fixes #5077
* tests/data: Fix some XML formatting issues in test casesDan Fandrich2020-03-113-3/+3
| | | | This allows these test files to pass xmllint.
* test1129: fix invalid case of closing XML-tag and Content-LengthMarc Hoersken2020-03-101-6/+5
| | | | | Fixes #5070 Closes #5072
* tests/data: fix static ip instead of dynamic value being usedMarc Hoersken2020-03-102-4/+4
| | | | Follow up to 94ced8e
* tests/data: fix static ip:port instead of dynamic values being usedMarc Hoersken2020-03-105-9/+9
| | | | Closes #5065
* tests/server: fix missing use of exe_ext helper functionMarc Hoersken2020-03-102-2/+10
| | | | | | Follow up to 9819984 and 3dce984 Reviewed-By: Daniel Stenberg Closes #5064
* runtests: log minimal and maximal used port numbersMarc Hoersken2020-03-101-0/+7
|
* sftp: fix segfault regression introduced by #4747Jim Fuller2020-03-092-1/+47
| | | | | | | | This fix adds a defensive check for the case where the char *name in struct libssh2_knownhost is NULL Fixes #5041 Closes #5062
* silly web server: silent a compilation warningPatrick Monnerat2020-03-081-1/+1
| | | | | | | | | Recent gcc warns when byte count of strncpy() equals the destination buffer size. Since the destination buffer is previously cleared and the source string is always shorter, reducing the byte count by one silents the warning without affecting the result. Closes #5059
* test 1560: avoid valgrind false positivesPatrick Monnerat2020-03-081-1/+4
| | | | | | | When using maximum code optimization level (-O3), valgrind wrongly detects uses of uninitialized values in strcmp(). Preset buffers with all zeroes to avoid that.
* lib1564: reduce number of mid-wait wakeup callsDaniel Stenberg2020-03-071-2/+2
| | | | | | | | | | | | | | | | | | This test does A LOT of *wakeup() calls and then calls curl_multi_poll() twice. The first *poll() is then expected to return early and the second not - as the first is supposed to drain the socketpair pipe. It turns out however that when given "excessive" amounts of writes to the pipe, some operating systems (the Solaris based are known) will return EAGAIN before the pipe is drained, which in our test case causes the second *poll() call to also abort early. This change attempts to avoid the OS-specific behaviors in the test by reducing the amount of wakeup calls from 1234567 to 10. Reported-by: Andy Fiddaman Fixes #5037 Closes #5058
* mime: fix the binary encoder to handle large data properlyPatrick Monnerat2020-03-075-3/+422
| | | | | | | | | | New test 666 checks this is effective. As upload buffer size is significant in this kind of tests, shorten it in similar test 652. Fixes #4860 Closes #4833 Reported-by: RuurdBeerstra on github
* mime: do not perform more than one read in a rowPatrick Monnerat2020-03-0713-27/+530
| | | | | | | | | | | | | | | | | | | | | Input buffer filling may delay the data sending if data reads are slow. To overcome this problem, file and callback data reads do not accumulate in buffer anymore. All other data (memory data and mime framing) are considered as fast and still concatenated in buffer. As this may highly impact performance in terms of data overhead, an early end of part data check is added to spare a read call. When encoding a part's data, an encoder may require more bytes than made available by a single read. In this case, the above rule does not apply and reads are performed until the encoder is able to deliver some data. Tests 643, 644, 645, 650 and 654 have been adapted to the output data changes, with test data size reduced to avoid the boredom of long lists of 1-byte chunks in verification data. New test 667 checks mimepost using single-byte read callback with encoder. New test 668 checks the end of part data early detection. Fixes #4826 Reported-by: MrdUkk on github
* mime: latch last read callback status.Patrick Monnerat2020-03-079-2/+577
| | | | | | | | | | | | | In case a read callback returns a status (pause, abort, eof, error) instead of a byte count, drain the bytes read so far but remember this status for further processing. Takes care of not losing data when pausing, and properly resume a paused mime structure when requested. New tests 670-673 check unpausing cases, with easy or multi interface and mime or form api. Fixes #4813 Reported-by: MrdUkk on github
* runtests: fix missing use of exe_ext helper functionMarc Hoersken2020-03-071-2/+2
|
* tests: use native Sleep function as fallback on WindowsMarc Hoersken2020-03-071-2/+7
| | | | | Reviewed-By: Daniel Stenberg Closes #5054
* perl: align order and completeness of Windows OS checksMarc Hoersken2020-03-071-1/+1
|
* libssh: Fix matching user-specified MD5 hex keyJay Satiro2020-03-078-5/+142
| | | | | | | | | | | Prior to this change a match would never be successful because it was mistakenly coded to compare binary data from libssh to a user-specified hex string (ie CURLOPT_SSH_HOST_PUBLIC_KEY_MD5). Reported-by: fds242@users.noreply.github.com Fixes https://github.com/curl/curl/issues/4971 Closes https://github.com/curl/curl/pull/4974
* unit1612: fixed the inclusion and compilation of the HMAC unit testSteve Holme2020-03-062-2/+3
| | | | | | | | | Follow up to 3f74e5e6 to fix: - A typo in Makefile.inc where unit1611 was used instead - Some compilation issues in unit1612.c Closes #5024
* polarssl: remove more references and mentionsDaniel Stenberg2020-03-051-5/+0
| | | | | | Assisted-by: Jay Satiro Follow-up to 6357a19ff29dac04 Closes #5036
* tests: wrap ignored test failures in bracesMarc Hoersken2020-03-041-1/+7
|
* tests: align some Windows sleep defines with each otherMarc Hoersken2020-03-043-5/+5
|
* tests: try to make sleeping portable by avoiding selectMarc Hoersken2020-03-043-8/+37
| | | | | | | | select does not support just waiting on Windows: https://perldoc.perl.org/perlport.html#select Reviewed-By: Daniel Stenberg Closes #5035
* runtests.1: rephrase how to specify what tests to runDaniel Stenberg2020-03-041-16/+25
| | | | | | | Also mention the new tilde-prefixed way to ignore test results. Reviewed-By: Marc Hoersken Closes #5033
* ci/tests: fix escaping of testnames and disable proxy for CI APIsMarc Hoersken2020-03-032-8/+14
| | | | | Follow up to ada581f and c0d8b96 Closes #5031
* ci/tests: Make it possible to still run but ignore failing testsMarc Hoersken2020-03-033-17/+52
| | | | | | | This enables the development of a solution for the failing tests by running them on CI while ignoring their result for the overall status. Closes #4994
* ci/tests: Move CI test result creation above environment setupMarc Hoersken2020-03-031-10/+14
| | | | | | This avoids using our test servers as proxy to the AppVeyor API. Closes #5022