summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests/*server.pl: flush output before executing subprocessMarc Hoersken2021-08-186-3/+18
| | | | | | | | | | | | | | | | | | Also avoid shell processes staying around by using exec. This is necessary to avoid output data being buffering inside the process chain of Perl, Bash/Shell and our test server binaries. On non-Windows systems the exec will also make the subprocess replace the intermediate shell, but on Windows it will at least bind the processes together since there is no real fork or exec available. See: https://cygwin.com/cygwin-ug-net/highlights.html and: https://docs.microsoft.com/cpp/c-runtime-library/exec-wexec-functions Ref: https://github.com/curl/curl/pull/7530#issuecomment-900949010 Reviewed-by: Daniel Stenberg Reviewed-by: Jay Satiro Closes #7530
* tests/server/*.c: align handling of portfile argument and fileMarc Hoersken2021-08-176-25/+47
| | | | | | | | | | | | 1. Call the internal variable portname (like pidname) everywhere. 2. Have a variable wroteportfile (like wrotepidfile) everywhere. 3. Make sure the file is cleaned up on exit (like pidfile). 4. Add parameter --portfile to usage outputs everywhere. Reviewed-by: Daniel Stenberg Replaces #7523 Closes #7574
* misc: update incorrect copyright year rangesDaniel Stenberg2021-08-168-8/+8
| | | | Closes #7577
* c-hyper: initial step for 100-continue supportDaniel Stenberg2021-08-131-1/+0
| | | | | | Enabled test 154 Closes #7568
* http: consider cookies over localhost to be secureDaniel Stenberg2021-08-103-71/+132
| | | | | | | | | Updated test31. Added test 392 to verify secure cookies used for http://localhost Reviewed-by: Daniel Gustafsson Fixes #6733 Closes #7263
* test1565: fix windows build errorsJay Satiro2021-08-101-4/+7
| | | | | | | | | | | | | - Use our wait_ms() instead of sleep() since Windows doesn't have the latter. - Use a separate variable to keep track of whether the pthread_t thread id is valid. On Windows pthread_t is not an integer type. pthread offers no macro for invalid pthread_t thread id, so validity is kept track of separately. Closes https://github.com/curl/curl/pull/7527
* tool/tests: fix potential year 2038 issuesBin Lan2021-07-302-4/+4
| | | | | | | | | | The length of 'long' in a 32-bit system is 32 bits, which cannot be used to save timestamps after 2038. Most operating systems have extended time_t to 64 bits. Remove the castings to long. Closes #7466
* tests: make three tests pass until 2037Bernhard M. Wiedemann2021-07-303-6/+7
| | | | | | after 2038 something in test1915 fails on 32-bit OSes Closes #7512
* tests/*server.py: remove pidfile on server terminationMarc Hoersken2021-07-293-0/+9
| | | | | | | Avoid pidfile leaking/laying around after server already exited. Reviewed-by: Daniel Stenberg Closes #7506
* tests/servers: remove obsolete pid variableMarc Hoersken2021-07-253-12/+3
| | | | | | | Variable is not used since pidfile handling moved to util.[ch] Reviewed-by: Jay Satiro Closes #7482
* tests/servers: use our platform-aware pid for server verificationMarc Hoersken2021-07-255-12/+22
| | | | | | | | | | | The pid used for server verification is later stored as pid2 in the hash of running test servers and therefore used for shutdown. The pid used for shutdown must be the platform-aware (Win32) pid to avoid leaking test servers while running them using Cygwin/msys. Reviewed-by: Jay Satiro Closes #7481
* tests/runtests.pl: cleanup copy&paste mistakes and unused codeMarc Hoersken2021-07-251-7/+4
| | | | | Reviewed-by: Jay Satiro Part of #7481
* cleanup: spell DoH with a lowercase oJosh Soref2021-07-161-3/+3
| | | | | | Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> Closes #7413
* msnprintf: return number of printed characters excluding null byteDaniel Stenberg2021-07-083-10/+43
| | | | | | | | ... even when the output is "capped" by the maximum length argument. Clarified in the docs. Closes #7361
* infof: remove newline from format strings, always append itDaniel Stenberg2021-07-071-14/+18
| | | | | | | | | | | | | | | | - the data needs to be "line-based" anyway since it's also passed to the debug callback/application - it makes infof() work like failf() and consistency is good - there's an assert that triggers on newlines in the format string - Also removes a few instances of "..." - Removes the code that would append "..." to the end of the data *iff* it was truncated in infof() Closes #7357
* test1147: hyper doesn't allow "crazy" request headers like built-inDaniel Stenberg2021-07-052-1/+4
| | | | | | ... so strip that from the test. Closes #7349
* c-hyper: bail on too long response headersDaniel Stenberg2021-07-051-2/+0
| | | | | | To match with built-in behaviors. Makes test 1154 work. Closes #7350
* test1151: added missing CRLF to work with hyperDaniel Stenberg2021-07-051-0/+1
| | | | Closes #7350
* test1116: hyper doesn't pass through "surprise-trailers"Daniel Stenberg2021-07-052-1/+6
| | | | Closes #7344
* test1519: adjusted to work with hyperDaniel Stenberg2021-07-012-6/+5
| | | | Closes #7333
* test1518: adjusted to work with hyperDaniel Stenberg2021-07-013-12/+11
| | | | | | ... by making sure the stdout output doesn't look like HTTP headers. Closes #7333
* test1514: add a CRLF to the response to make it correctDaniel Stenberg2021-07-012-1/+1
| | | | | | | Makes hyper accept it fine instead returning HYPERE_UNEXPECTED_EOF on us. Closes #7334
* lib677: make it survive torture testingDaniel Stenberg2021-06-271-6/+9
| | | | | | Follow-up to a5ab72d5edd7 Closes #7300
* test677: IMAP CONNECT_ONLY, custom command and then exitDaniel Stenberg2021-06-246-3/+174
| | | | | | Adjusted ftpserver.pl to add support for the IMAP IDLE command Adjusted test 660 to sync with the fix
* cmake: fix support for UnixSockets feature on Win32Li Xinwei2021-06-211-5/+9
| | | | | | | | | | | | | Move the definition of sockaddr_un struct from config-win32.h to curl_setup.h, so that it could be shared by all build systems. Add ADDRESS_FAMILY typedef for old mingw, now old mingw can also use unix sockets. Also fix the build of tests/server/sws.c on Win32 when USE_UNIX_SOCKETS is defined. Closes #7034
* hyper: propagate errors back up from read callbacksDaniel Stenberg2021-06-172-1/+2
| | | | | | Makes test 513 work with hyper Closes #7266
* curl_url_set: reject spaces in URLs w/o CURLU_ALLOW_SPACEDaniel Stenberg2021-06-153-8/+37
| | | | | | | | | | | | | They were never officially allowed and slipped in only due to sloppy parsing. Spaces (ascii 32) should be correctly encoded (to %20) before being part of a URL. The new flag bit CURLU_ALLOW_SPACE when a full URL is set, makes libcurl allow spaces. Updated test 1560 to verify. Closes #7073
* netrc: skip 'macdef' definitionsDaniel Stenberg2021-06-132-1/+61
| | | | | | | | Add test 494 to verify Reported-by: Harry Sintonen Fixes #7238 Closes #7244
* mqtt: add support for username and passwordGealber Morales2021-06-129-6/+399
| | | | | | | Minor-edits-by: Daniel Stenberg Added test 2200 to 2205 Closes #7243
* runtests: init $VERSION to avoid warnings when using -lDaniel Stenberg2021-06-111-1/+1
|
* tests: update README about servers and port numbersDaniel Stenberg2021-06-111-11/+11
| | | | Closes #7242
* sws: malloc request struct instead of using stackChristian Weisgerber2021-06-111-17/+24
| | | | | | | | | | ... 2MB requests is otherwise just too big for some systems. (The allocations are not freed properly.) Bug: https://curl.se/mail/lib-2021-06/0018.html Closes #7235
* tests: update README.md with a missing single quoteyb9992021-06-101-1/+1
| | | | Closes #7231
* tests/data/DISABLED: add tests not working with hyperDaniel Stenberg2021-06-101-0/+116
| | | | | | The goal is to remove them all from here over time. Closes #7209
* runtests: also find the last test in Makefile.incDaniel Stenberg2021-06-101-1/+1
| | | | Closes #7209
* test3010: work with hyper modeDaniel Stenberg2021-06-102-5/+5
| | | | Closes #7209
* test1594/1595/1596: fix to work in hyper modeDaniel Stenberg2021-06-104-5/+5
| | | | Closes #7209
* test1438/1457: add HTTP keyword to make hyper mode workDaniel Stenberg2021-06-102-0/+2
| | | | Closes #7209
* test1340/1341: adjusted for hyper modeDaniel Stenberg2021-06-102-4/+4
| | | | Closes #7209
* test1218: adjusted for hyper modeDaniel Stenberg2021-06-101-1/+1
| | | | Closes #7209
* test1216: adjusted for hyper modeDaniel Stenberg2021-06-101-1/+1
| | | | Closes #7209
* test1230: adjust to work in hyper modeDaniel Stenberg2021-06-101-2/+2
| | | | Closes #7209
* c-hyper: abort CONNECT response reading early on non 2xx responsesDaniel Stenberg2021-06-101-9/+17
| | | | | | Fixes test 493 Closes #7209
* test434: add HTTP keywordDaniel Stenberg2021-06-101-1/+1
| | | | Closes #7209
* test599: adjusted to work in hyper modeDaniel Stenberg2021-06-102-3/+3
| | | | Closes #7209
* test566: adjust to work with hyper modeDaniel Stenberg2021-06-102-4/+4
| | | | Closes #7209
* runtests: skip disabled tests unless -f is usedDaniel Stenberg2021-06-082-11/+15
| | | | | | | | | | | | To make it easier to write ranges like '115 to 229' without that explicitly enabling tests that are listed in DISABLED, this makes runtests always skip disabled tests unless the -f command line option is used. Previously the code attempted to not run such tests, but didn't do it correctly. Closes #7212
* test644: remove as duplicate of test 587Daniel Stenberg2021-06-083-65/+2
| | | | Closes #7208
* test500: adjust to work with hyper modeDaniel Stenberg2021-06-072-3/+3
|
* test433: adjust for hyper modeDaniel Stenberg2021-06-071-4/+4
| | | | Closes #7205