aboutsummaryrefslogtreecommitdiff
path: root/tests/server/util.c
AgeCommit message (Collapse)Author
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-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
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-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-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.
2018-11-23snprintf: renamed and we now only use msnprintf()Daniel Stenberg
The function does not return the same value as snprintf() normally does, so readers may be mislead into thinking the code works differently than it actually does. A different function name makes this easier to detect. Reported-by: Tomas Hoger Assisted-by: Daniel Gustafsson Fixes #3296 Closes #3297
2018-10-09Windows: fixes for MinGW targeting Windows VistaMarcel Raad
Classic MinGW has neither InitializeCriticalSectionEx nor GetTickCount64, independent of the target Windows version. Closes https://github.com/curl/curl/pull/3113
2018-06-11cppcheck: fix warningsMarian Klymov
- 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
2017-10-25timediff: return timediff_t from the time diff functionsDaniel Stenberg
... to cater for systems with unsigned time_t variables. - Renamed the functions to curlx_timediff and Curl_timediff_us. - Added overflow protection for both of them in either direction for both 32 bit and 64 bit time_ts - Reprefixed the curlx_time functions to use Curl_* Reported-by: Peter Piekarski Fixes #2004 Closes #2005
2017-09-11code style: use spaces around equals signsDaniel Stenberg
2017-08-02tests/server/util: fix curltime mistake from 4dee50b9c80f9Daniel Stenberg
2017-07-28timeval: struct curltime is a struct timeval replacementDaniel Stenberg
... to make all libcurl internals able to use the same data types for the struct members. The timeval struct differs subtly on several platforms so it makes it cumbersome to use everywhere. Ref: #1652 Closes #1693
2017-04-12tests/server/util: prefer <poll.h> over <sys/poll.h>Marcel Raad
Follow-up to aa573c3c55cda72ec5ef677d87f6f46a53385f0c Ref: https://github.com/curl/curl/pull/1406
2017-04-03tests/server/util: remove in6addr_any for recent MinGWMarcel Raad
In ancient MinGW versions, in6addr_any was declared as extern, but not defined. Because of that, 22a0c57746ae12506b1ba0f0fafffd26c1907d6a added definitions for in6addr_any when compiling with MinGW. The bug was fixed in w32api version 3.6 from 2006, so this workaround is not needed anymore for recent versions. This fixes the following MinGW-w64 warnings because the MinGW-w64 version of IN6ADDR_ANY_INIT has the two additional braces inside the macro: util.c:59:14: warning: braces around scalar initializer util.c:59:40: warning: excess elements in scalar initializer Ref: https://sourceforge.net/p/mingw/mingw-org-wsl/ci/e4803e0da25c57ae1ad0fa75ae2b7182ff7fa339/tree/w32api/ChangeLog Closes https://github.com/curl/curl/pull/1379
2016-12-13checksrc: stricter no-space-before-paren enforcementDaniel Stenberg
In order to make the code style more uniform everywhere
2016-10-31tests/util: get a private strncasecompare cloneDaniel Stenberg
... since the curlx_* code no longer provides one and we don't link libcurl to these test servers.
2016-04-03tests/server: comply with our code styleDaniel Stenberg
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
2013-04-06util.c: Revert workaround eeefcdf, 6eb56e7 and e3787e8Marc Hoersken
2013-04-06util.c: Follow up cleanup on eeefcdfMarc Hoersken
2013-04-06cpp: use #ifdef __MINGW32__ to avoid compiler complaintsDaniel Stenberg
... instead of just #if
2013-04-06util.c: Made write_pidfile write the correct PID on MinGW/MsysMarc Hoersken
This workaround fixes an issue on MinGW/Msys regarding the Perl testsuite scripts not being able to signal or control the server processes. The MinGW Perl runtime only sees the Msys processes and their corresponding PIDs, but sockfilt (and other servers) wrote the Windows PID into their PID-files. Since this PID is useless to the testsuite, the write_pidfile function was changed to search for the Msys PID and write that into the PID-file.
2013-01-09test servers: fix errno, ERRNO and SOCKERRNO usage for W32/W64Yang Tse
2013-01-06Revert changes relative to lib/*.[ch] recent renamingYang Tse
This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
2012-12-28build: make use of 76 lib/*.h renamed filesYang Tse
76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
2012-12-14setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>Yang Tse
Inclusion of top two most included header files now done in setup_once.h
2012-04-10test servers: build adjustmentYang Tse
Undefine CURL_HIDDEN_SYMBOLS libcurl private preprocessor macro that might leak from lib/setup.h into source files where this should not be defined.
2012-01-03test proxy supports CONNECTDaniel Stenberg
There's a new 'http-proxy' server for tests that runs on a separate port and lets clients do HTTP CONNECT to other ports on the same host to allow us to test HTTP "tunneling" properly. Test cases now have a <proxy> section in <verify> to check that the proxy protocol part matches correctly. Test case 80, 83, 95, 275, 503 and 1078 have been converted. Test 1316 was added.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-02-25Fixed bug report #2958074 indicatingYang Tse
(http://curl.haxx.se/bug/view.cgi?id=2958074) that curl on Windows with option --trace-time did not use local time when timestamping trace lines. This could also happen on other systems depending on time souurce.
2010-02-02avoid possibility of using obsoleted stuffYang Tse
2009-12-16Test harness process control enhancementsYang Tse
2009-12-09signal handling to cleanup on SIGINT and SIGTERM, followupYang Tse
2009-11-26Only attempt to clear the server-logs lock when previously set by this same ↵Yang Tse
server.
2008-10-01Fixed some compiler warnings with gccDan Fandrich
2008-09-26fix potential buffer overflow in test-server logging functionYang Tse
2008-09-18fix compiler warning: external declaration in primary source fileYang Tse
2008-04-23improve synchronization between test harness runtests.pl scriptYang Tse
and test harness servers to minimize risk of false test failures. http://curl.haxx.se/mail/lib-2008-04/0392.html
2008-02-28avoid inclusion of setup.h in util.hYang Tse
2008-02-28header inclusion cleanupYang Tse
2008-02-26trial to fix the HP-UX breakage...Gunter Knauf
2008-02-26refactor some code out to write_pidfile() in util.cYang Tse
2008-02-18Reduce to 20 seconds the time allowed to set SO_REUSEADDR option on sockfilt ↵Yang Tse
listener socket. Log some more error descriptions.
2008-01-22check availability of poll.h header at configuration time, and includeYang Tse
it when sys/poll.h is unavailable