aboutsummaryrefslogtreecommitdiff
path: root/tests/server
AgeCommit message (Collapse)Author
2020-04-29tests: look for preprocessed tests in build directoryKamil Dudka
... which is not always the same directory as source directory Closes #5310
2020-04-24tests/git: ignore mqttd and port filesEmil Engler
Closes #5290
2020-04-20tests: run the RTSP test server on a dynamic port numberDaniel Stenberg
To avoid port collisions. Closes #5272
2020-04-20server/tftpd: fix compiler warningDaniel Stenberg
Follow-up from 369ce38ac1d Reported-by: Marc Hörsken
2020-04-20tests: run the SOCKS test server on a dynamic port numberDaniel Stenberg
Closes #5266
2020-04-20tests: run the TFTP test server on a dynamic port numberDaniel Stenberg
Picking a dynamic unused port is better than a fixed to avoid the collision risk. Closes #5265
2020-04-20mqtt: improve the state machineDaniel Stenberg
To handle PUBLISH before SUBACK and more. Updated the existing tests and added three new ones. Reported-by: Christoph Krey Bug: https://curl.haxx.se/mail/lib-2020-04/0021.html Closes #5246
2020-04-18tests: move pingpong server to dynamic listening portDaniel Stenberg
FTP, IMAP, POP3, SMTP and their IPv6 versions are now all on dynamic ports Test 842-845 are unfortunately a bit hard to move over to this concept right now and require "default port" still...
2020-04-18tests: introduce preprocessed test casesDaniel Stenberg
The runtests script now always performs variable replacement on the entire test source file before the test gets executed, and saves the updated version in a temporary file (log/test[num]) so that all test case readers/servers can use that version (if present) and thus enjoy the powers of test case variable substitution. This is necessary to allow complete port number freedom. Test 309 is updated to work with a non-fixed port number thanks to this.
2020-04-18tests: run the sws server on "any port"Daniel Stenberg
Makes the test servers for HTTP and Gopher pop up on a currently unused port and runtests adapts to that! Closes #5247
2020-04-18sockfilt: tidy variable naming and data structure in select_wsMarc Hoersken
This commit does not introduce any logical changes to the code. Reviewed-by: Jay Satiro and Marcel Raad Closes #5238
2020-04-16mqttd: s/errno/SOCKERRNODaniel Stenberg
To behave proper on Windows Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/5e855bbd18f84a02c951be7cac6188276818cdac#r38507132 Closes #5241
2020-04-15copyright: bump the copyright year rangeDaniel Stenberg
2020-04-14sockfilt: fix broken pipe on Windows to be ready in select_wsMarc Hoersken
Closes #5228
2020-04-14tests: add the mqtt test server mqttdDaniel Stenberg
2020-04-12tests/server: add hidden window to gracefully handle WM_CLOSEMarc Hoersken
Forward Window events as signals to existing signal event handler.
2020-04-12tests/server: add CTRL event handler for Win32 consolesMarc Hoersken
Forward CTRL events as signals to existing signal event handler.
2020-04-12tests/server: move all signal handling routines to util.[ch]Marc Hoersken
Avoid code duplication to prepare for portability enhancements.
2020-04-11tests/server/util.c: use curl_off_t instead of long for pidMarc Hoersken
Avoid potential overflow of huge PIDs on Windows. Related to #5188 Assisted-by: Marcel Raad
2020-04-11tests: fix conflict between Cygwin/msys and Windows PIDsMarc Hoersken
Add 65536 to Windows PIDs to allow Windows specific treatment by having disjunct ranges for Cygwin/msys and Windows PIDs. See also: - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵ h=b5e1003722cb14235c4f166be72c09acdffc62ea - https://cygwin.com/git/?p=newlib-cygwin.git;a=commit; ↵ h=448cf5aa4b429d5a9cebf92a0da4ab4b5b6d23fe Replaces #5178 Closes #5188
2020-04-09server/resolve: remove AI_CANONNAME to make macos tell the truthDaniel Stenberg
With this bit set, my mac successfully resolves "ip6-localhost" when in fact there is no such host known to my machine! That in turn made test 241 wrongly execute and fail. Closes #5202
2020-04-06cleanup: correct copyright year range on a few filesDaniel Stenberg
2020-04-03sockfilt: remove redundancy in timeout handlingMarc Hoersken
And update other logmsg output in select_ws on Windows.
2020-04-03sockfilt: fix handling of ready closed sockets on WindowsMarc Hoersken
Replace the incomplete workaround regarding FD_CLOSE only signalling once by instead doing a pre-check with standard select and storing the result for later use. select keeps triggering on closed sockets on Windows while WSAEventSelect fires only once with data still available. By doing the pre-check we do not run in a deadlock due to waiting forever for another FD_CLOSE event.
2020-04-03sockfilt: fix race-condition of waiting threads and event handlingMarc Hoersken
Fix race-condition of waiting threads finishing while events are already being processed which lead to invalid or skipped events. Use mutex to check for one event at a time or do post-processing. In addition to mutex-based locking use specific event as signal. Closes #5156
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-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-04tests: align some Windows sleep defines with each otherMarc Hoersken
2020-02-26http: added 417 response treatmentDaniel Stenberg
When doing a request with a body + Expect: 100-continue and the server responds with a 417, the same request will be retried immediately without the Expect: header. Added test 357 to verify. Also added a control instruction to tell the sws test server to not read the request body if Expect: is present, which the new test 357 uses. Reported-by: bramus on github Fixes #4949 Closes #4964
2020-02-02cleanup: fix typos and wording in docs and commentsPedro Monreal
Closes #4869 Reviewed-by: Emil Engler and Daniel Gustafsson
2020-01-03tests: Fix bounce requests with truncated writesMarc Aldorasi
Prior to this change the swsbounce check in service_connection could fail because prevtestno and prevpartno were not set, which would cause the wrong response data to be sent to some tests and cause them to fail. Ref: https://github.com/curl/curl/pull/4717#issuecomment-570240785
2019-12-19sws: search for "Testno:" header uncondtionally if no testnoDaniel Stenberg
Even if the initial request line wasn't found. With the fix to 1455, the test number is now detected correctly. (Problem found when running tests in random order.) Closes #4744
2019-12-16tests: make sure checksrc runs on header files tooDaniel Stenberg
2019-12-03curl_setup: disable IPv6 resolver without `getaddrinfo`Marcel Raad
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
2019-12-01build: Disable Visual Studio warning "conditional expression is constant"Jay Satiro
- 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
2019-11-09strerror: Fix an error looking up some Windows error stringsJay Satiro
- 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
2019-11-02copyrights: update all copyright notices to 2019 on files changed this yearVilhelm Prytz
Closes #4547
2019-09-30git: add tests/server/disabled to .gitignoreEmil Engler
Closes #4441
2019-06-17tests: have runtests figure out disabled featuresDaniel Stenberg
... so that runtests can skip individual test cases that test features that are explicitly disabled in this build. This new logic is intended for disabled features that aren't otherwise easily visible through the curl_version_info() or other API calls. tests/server/disabled is a newly built executable that will output a list of disabled features. Outputs nothing for a default build. Closes #3950
2019-06-05build: fix Codacy warningsMarcel Raad
Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
2019-06-05sws: remove unused variablesMarcel Raad
Unused since commit 2f44e94. Closes https://github.com/curl/curl/pull/3975
2019-06-02tests/server/.gitignore: Add socksd to the ignore listSteve Holme
Missed in 04fd6755. Closes #3978
2019-04-14socksd: Fix typosDaniel Gustafsson
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2019-04-14socksd: Properly decorate static variablesDaniel Gustafsson
Mark global variables static to avoid compiler warning in Clang when using -Wmissing-variable-declarations. Closes #3778 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2019-04-13socksd: new SOCKS 4+5 server for testsDaniel Stenberg
Closes #3752
2019-04-11tests/server/util: fix Windows Unicode buildMarcel Raad
Always use the ANSI version of FormatMessage as we don't have the curl_multibyte gear available here. Closes https://github.com/curl/curl/pull/3758
2019-04-06pipelining: removedDaniel Stenberg
As previously planned and documented in DEPRECATE.md, all pipelining code is removed. Closes #3651
2019-03-14makefile: make checksrc and hugefile commands "silent"Daniel Stenberg
... to match the style already used for compiling, linking etc. Acknowledges 'make V=1' to enable verbose. Closes #3681
2019-01-01tvnow: silence conversion warningsMarcel Raad
MinGW-w64 defaults to targeting Windows 7 now, so GetTickCount64 is used and the milliseconds are represented as unsigned long long, leading to a compiler warning when implicitly converting them to long.