aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-03-31build: fixed build for systems with select() in unistd.hHarry Sintonen
Closes #5169
2020-03-30cleanup: insert newline after if() conditionsDaniel Stenberg
Our code style mandates we put the conditional block on a separate line. These mistakes are now detected by the updated checksrc.
2020-03-29dist: add tests/version-scan.pl to tarballDaniel Stenberg
... used in test 1177. Follow-up to a97d826f6de3
2020-03-29test1177: verify that all the CURL_VERSION_ bits are documentedDaniel Stenberg
2020-03-27writeout_json: Fix data type issuesMichael Kaufmann
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
2020-03-26sockfilt: add logmsg output to select_ws_wait_thread on WindowsMarc Hoersken
Assisted-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #5086
2020-03-24copyright: fix out-of-date copyright ranges and missing headersDaniel Stenberg
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
2020-03-22getinfo: provide CURLINFO_HEADER_SIZE and CURLINFO_REQUEST_SIZE overrideDaniel Stenberg
To let debug-builds return fake values, like in test 970. Ref: #5131 Closes #5136
2020-03-22test970: improve the testDaniel Stenberg
- 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
2020-03-20tests: add test 430, 431 and 432 to verify the --config fixDaniel Stenberg
Verify the fixes in 4e0b4fee4
2020-03-20test2100: fix static port instead of dynamic value being usedMarc Hoersken
2020-03-20test970: fix static ip:port instead of dynamic values being usedMarc Hoersken
2020-03-19tests: make Python-based servers compatible with Python 2 and 3Marc Hoersken
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
2020-03-18schannel: add "best effort" revocation check optionJohannes Schindelin
- 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
2020-03-17test 970: verify --write-out '%{json}'Daniel Stenberg
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
2020-03-17DISABLED: disable test 323Daniel Stenberg
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
2020-03-15tests: fix verification of stdout in test 1452 due to newlineMarc Hoersken
Fixes test1452:41:1: error: missing </stdout> tag before </verify>
2020-03-15tests/README: add note about manually installing python-impacketMarc Hoersken
Follow up to 4be2560
2020-03-15tests: remove python_dependencies for smbserver from our treeMarc Hoersken
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
2020-03-13server/getpart: make the "XML-parser" stricterDaniel Stenberg
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
2020-03-13impacket: some more Python 3 code compatibility updatesMarc Hoersken
This makes smbserver load on Python 3, but still not work completely.
2020-03-13smbserver: pin Python version to 2 since we are not yet 3 compatibleMarc Hoersken
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
2020-03-12cleanup: fix some text/comment typosViktor Szakats
Closes #5087
2020-03-12smbserver: fix Python version specific ConfigParser importMarc Hoersken
Follow up to ee63837 and 8c7c4a6 Fixes #5077
2020-03-11tests/data: Fix some XML formatting issues in test casesDan Fandrich
This allows these test files to pass xmllint.
2020-03-10test1129: fix invalid case of closing XML-tag and Content-LengthMarc Hoersken
Fixes #5070 Closes #5072
2020-03-10tests/data: fix static ip instead of dynamic value being usedMarc Hoersken
Follow up to 94ced8e
2020-03-10tests/data: fix static ip:port instead of dynamic values being usedMarc Hoersken
Closes #5065
2020-03-10tests/server: fix missing use of exe_ext helper functionMarc Hoersken
Follow up to 9819984 and 3dce984 Reviewed-By: Daniel Stenberg Closes #5064
2020-03-10runtests: log minimal and maximal used port numbersMarc Hoersken
2020-03-09sftp: fix segfault regression introduced by #4747Jim Fuller
This fix adds a defensive check for the case where the char *name in struct libssh2_knownhost is NULL Fixes #5041 Closes #5062
2020-03-08silly web server: silent a compilation warningPatrick Monnerat
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
2020-03-08test 1560: avoid valgrind false positivesPatrick Monnerat
When using maximum code optimization level (-O3), valgrind wrongly detects uses of uninitialized values in strcmp(). Preset buffers with all zeroes to avoid that.
2020-03-07lib1564: reduce number of mid-wait wakeup callsDaniel Stenberg
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
2020-03-07mime: fix the binary encoder to handle large data properlyPatrick Monnerat
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
2020-03-07mime: do not perform more than one read in a rowPatrick Monnerat
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
2020-03-07mime: latch last read callback status.Patrick Monnerat
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
2020-03-07runtests: fix missing use of exe_ext helper functionMarc Hoersken
2020-03-07tests: use native Sleep function as fallback on WindowsMarc Hoersken
Reviewed-By: Daniel Stenberg Closes #5054
2020-03-07perl: align order and completeness of Windows OS checksMarc Hoersken
2020-03-07libssh: Fix matching user-specified MD5 hex keyJay Satiro
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
2020-03-06unit1612: fixed the inclusion and compilation of the HMAC unit testSteve Holme
Follow up to 3f74e5e6 to fix: - A typo in Makefile.inc where unit1611 was used instead - Some compilation issues in unit1612.c Closes #5024
2020-03-05polarssl: remove more references and mentionsDaniel Stenberg
Assisted-by: Jay Satiro Follow-up to 6357a19ff29dac04 Closes #5036
2020-03-04tests: wrap ignored test failures in bracesMarc Hoersken
2020-03-04tests: align some Windows sleep defines with each otherMarc Hoersken
2020-03-04tests: try to make sleeping portable by avoiding selectMarc Hoersken
select does not support just waiting on Windows: https://perldoc.perl.org/perlport.html#select Reviewed-By: Daniel Stenberg Closes #5035
2020-03-04runtests.1: rephrase how to specify what tests to runDaniel Stenberg
Also mention the new tilde-prefixed way to ignore test results. Reviewed-By: Marc Hoersken Closes #5033
2020-03-03ci/tests: fix escaping of testnames and disable proxy for CI APIsMarc Hoersken
Follow up to ada581f and c0d8b96 Closes #5031
2020-03-03ci/tests: Make it possible to still run but ignore failing testsMarc Hoersken
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
2020-03-03ci/tests: Move CI test result creation above environment setupMarc Hoersken
This avoids using our test servers as proxy to the AppVeyor API. Closes #5022