Commit Graph

3109 Commits

Author SHA1 Message Date
Marc Hoersken 3c2c1f9876 test1113: fix line-endings checks on Windows after 75f00de5 2014-02-15 09:12:59 +01:00
Marc Hoersken 8451623b45 lib1515.c: Added support for Windows using the Sleep function 2014-02-14 22:17:54 +01:00
Marc Hoersken 0a568867c0 HTTP tests: use CRLF as header seperator according to RFC 2616
Updates the test suite to handle binary-mode header output.
2014-02-14 20:12:28 +01:00
Marc Hoersken 89c29aa70f HTTP tests: use CRLF as header seperator according to RFC 2616
Changes LF to CRLF and disables automatic output conversion.
2014-02-14 20:12:27 +01:00
Marc Hoersken 75f00de55c testsuite: use binary output mode for custom curl test tools
Do not try to convert line-endings to CRLF on Windows by setting stdout
to binary mode, just like the curl tool does if --ascii is not specified.

This should prevent corrupted stdout line-ending output like CRCRLF.

In order to make the previously naive text-aware tests work with
binary mode on Windows, text-mode is disabled for them if it is not
actually part of the test case and line-endings are corrected.
2014-02-14 20:12:27 +01:00
Marc Hoersken 69745aaa45 testsuite: changed HTTP and RTSP header line-endings to CRLF
According to RFC 2616 and RFC 2326 individual protocol elements, like
headers and except the actual content, are terminated by using CRLF.

Therefore the test data files for these protocols need to contain
mixed line-endings if the actual protocol elements use CRLF while
the file uses LF.
2014-02-14 20:12:26 +01:00
Dan Fandrich 25600bdf75 valgrind: added suppression on optimized code
gcc 4.7.2 with -O2 will optimize Curl_connect by inlining some
functions two levels deep, which makes the valgrind suppression
fail to match. The underlying reason for these idna suppressions is
a gcc strlen optimization when compiling libidn; compiling it with
-fno-builtin-strlen makes this suppression unnecessary.
2014-02-14 08:48:23 +01:00
Dan Fandrich 82a4d537c3 tests: Disabled broken test 1316
See http://curl.haxx.se/mail/lib-2014-02/0004.html for a
discussion on the problem.
2014-02-11 21:31:46 +01:00
Dan Fandrich 3a0d1bebba secureserver: Only set stunnel FIPS option when available
It seems the fips config option causes an error if FIPS mode was
not enabled at stunnel compile-time.  FIPS support was disabled
by default in stunnel 5.00, so this is probably really only needed
on versions between 4.32 and 5.00.
2014-02-10 21:56:20 +01:00
Steve Holme daa182afa6 tests: Added test for IMAP LSUB command 2014-02-09 21:21:10 +00:00
Steve Holme 230e872dbd tests: Removed test 807 as it has been superseded by tests 815 and 816 2014-02-09 21:07:02 +00:00
Steve Holme 5a997d97fd tests: Updated the titles of tests 815 and 816 2014-02-09 21:00:17 +00:00
Steve Holme ea3828e0c7 tests: Re-enabled IMAP tests that require URL specific option support 2014-02-09 14:49:38 +00:00
Marc Hoersken 8e62f7a650 secureserver: FIPS option is only supported since stunnel 5.00 2014-02-09 13:39:43 +01:00
Daniel Stenberg 6b9a3c1865 test96: updated according to recent changes 2014-02-08 23:20:10 +01:00
Daniel Stenberg 1f148c103c runtests: allow <strippart> to remove lines
For verify file, if the strippart condition removes the line completely
it is now removed from the array.
2014-02-08 23:19:10 +01:00
Steve Holme 132f5edfbd tool_getparam: Added support for parsing of specific URL options 2014-02-08 11:18:25 +00:00
Dan Fandrich 2d8623e85d secureserver: Disable FIPS mode for stunnel
It's unnecessary for curl testing, and it can otherwise cause
stunnel to fail to start if OpenSSL doesn't support FIPS mode.
2014-02-08 11:51:28 +01:00
Dan Fandrich e2dae8a7c2 runtests: Disable valgrind when debugging
This was already mostly being done, except that analysis after the
test still assumed that the valgrind log files would be available. An
alternative way to handle the valgrind + gdb combination could be to
enable one of the valgrind debugger hooks.
2014-02-07 22:43:34 +01:00
Steve Holme 6c492f34e5 lib1515.c: Fixed various compilation warnings
lib1515.c:38:26 warning: unused parameter 'curl'
lib1515.c:38:81 warning: unused parameter 'ptr'
lib1515.c:38:5 warning: no previous prototype for 'debug_callback'
lib1515.c:46:5 warning: no previous prototype for 'do_one_request'
lib1515.c:120:3  warning: ISO C90 forbids mixed declarations and code

As well as some code policing such as white space and braces.
2014-02-07 15:15:17 +00:00
Daniel Stenberg 9597f7dfbc formpost: use semicolon in multipart/mixed
Not comma, which is an inconsistency and a mistake probably inherited
from the examples section of RFC1867.

This bug has been present since the day curl started to support
multipart formposts, back in the 90s.

Reported-by: Rob Davies
Bug: http://curl.haxx.se/bug/view.cgi?id=1333
2014-02-07 09:43:36 +01:00
Dan Fandrich 7969a77735 tests: Document use of the MEMDEBUG_LOG_SYNC macro 2014-02-06 23:56:47 +01:00
Romulo A. Ceccon 8d1377282e tests: add test for bug #1327 (dns cache timeout)
Fix for bug #1303 (030a2b8cb) was not complete.
libcurl still pruned DNS entries added manually
after detecting a dead connection. This test
checks such behavior.
2014-02-06 23:03:34 +01:00
Romulo A. Ceccon 1505e4612b tests: add test for bug #1303 (dns cache timeout)
Test-case 1515 reproduces bug #1303, where libcurl
would incorrectly prune DNS entries added via
CURLOPT_RESOLVE after the DNS_CACHE_TIMEOUT had
expired.
2014-02-06 23:03:34 +01:00
Daniel Stenberg 5204b45ff9 runtests: add suppression generator help
Leave the valgrind --gen-suppressions option in there, commented, to
make it easier for next update.
2014-02-05 23:48:44 +01:00
Daniel Stenberg 225ec4312f valgrind: updated suppressions file
The call stack was modified in 2dc7ad23 so the supressions didn't work
anymore.
2014-02-05 23:46:31 +01:00
Daniel Stenberg 18b540f9d1 runtests: detect 'ares' better
... caused false detections of the threaded resolver otherwise
2014-02-05 23:36:16 +01:00
Dan Fandrich 2f89a61cc0 tests: Moved some comments so the test data files parse as XML 2014-02-03 00:23:34 +01:00
Steve Holme ffb8a21d85 tests: Fixed test172 cookie expiry
The test contains a cookie jar file where one of the cookies has an
expiry date of 1391252187 -- Sat, 1 Feb 2014 10:56:27 GMT which has
now expired. Updated to Wed, 14 Oct 2037 16:36:33 GMT as per test
179.

Reported-by: Adam Sampson
Bug: http://curl.haxx.se/bug/view.cgi?id=1330
2014-02-02 11:01:10 +00:00
Marc Hoersken e5acae0052 test 500: workaround low timer resolution on Windows
Since the timer resolution is lower, there are actually cases that
the compared values are equal. Therefore we check for previous
timestamps being greater than the current one instead.
2014-02-01 14:04:47 +01:00
Marc Hoersken efc112079c test suite: stop conversion of valid output to CRLF on Windows
Since the output isn't actually being written in text-mode and it
was rather used as a workaround, disable text-mode for these tests.
2014-02-01 13:49:58 +01:00
Marc Hoersken 2c49f2e3db HTTP tests: use CRLF as header seperator according to RFC 2616 2014-02-01 13:47:00 +01:00
Marc Hoersken 9f42205dcc FTP tests: enable text-mode for more datacheck sections 2014-02-01 13:43:19 +01:00
Marc Hoersken 4ea2d5579b FTP tests: enable text-mode for data and datacheck sections 2014-01-31 20:05:21 +01:00
Marc Hoersken 9f132f9f39 runtests.pl: added support for text-mode within datacheck section 2014-01-31 20:05:17 +01:00
Marc Hoersken ca9ab24ed5 ftpserver.pl: directory LISTings use [CR][LF] for ASCII transfer
According to section 2.2 of RFC959 the End-of-Line is defined as:
 The end-of-line sequence defines the separation of printing
 lines.  The sequence is Carriage Return, followed by Line Feed.

Verified by sniffing traffic between a Windows FTP client (FileZilla)
and Unix-hosted FTP server (ProFTPD).
2014-01-31 20:05:14 +01:00
Marc Hoersken 480ca49ecb runtests.pl: reverse line-ending conversion on Windows
It makes more sense to convert the expected output to [CR][LF] on
Windows than to force the actual, probably correct, output to [LF].

This way it is actually possible to see if curl outputs the correct
line-ending excepted by a text-aware test case.
2014-01-31 20:05:09 +01:00
Dan Fandrich be9cc620b5 tests: make the authorization retry tests pass the torture tests 2014-01-30 23:18:20 +01:00
Steve Holme 784f225266 tests: Missed updating a type-3 message in commit 1c9aaa0bac 2014-01-30 20:51:34 +00:00
Steve Holme 1c9aaa0bac tests: Updated NTLM tests for NTLMv2 type-3 message 2014-01-30 19:14:04 +00:00
Dan Fandrich 9873fd5317 tests: make a few lib15?? tests pass the OOM torture tests 2014-01-29 00:40:33 +01:00
Dan Fandrich d735d3e803 lib1900: make the test pass the OOM torture tests 2014-01-29 00:19:34 +01:00
Dan Fandrich f00899d73e unit1304: make the test pass the OOM torture tests 2014-01-28 23:47:20 +01:00
Dan Fandrich 00b1e52823 unit1396: make the test pass the OOM torture tests 2014-01-28 23:27:22 +01:00
Marc Hoersken 23a04863aa testsuite: visualize line-endings in output comparison diffs 2014-01-26 10:00:14 +01:00
Marc Hoersken 33f9c05082 sockfilt.c: follow up cleanup commit on 49b63cf3 2014-01-26 09:44:16 +01:00
Marc Hoersken 00787f94b2 http-pipe tests: use text as output data mode to support Windows 2014-01-26 09:19:32 +01:00
Marc Hoersken 49b63cf30d sockfilt.c: fixed and simplified Windows select function
Since the previous complex select function with initial support for
non-socket file descriptors, did not actually work correctly for
Console handles, this change simplifies the whole procedure by using
an internal waiting thread for the stdin console handle.

The previous implementation made it continuously trigger for the stdin
handle if it was being redirected to a parent process instead of
an actual Console input window.

This approach supports actual Console input handles as well as
anonymous Pipe handles which are used during input redirection.

It depends on the fact that ReadFile supports trying to read zero bytes
which makes it wait for the handle to become ready for reading.
2014-01-26 00:58:30 +01:00
Marc Hoersken f55f8d4c18 http_pipe.py: replaced epoll with select to support Windows
Removed Unix-specific functionality in order to support Windows:
- select.epoll replaced with select.select
- SocketServer.ForkingMixIn replaced with SocketServer.ForkingMixIn
- socket.MSG_DONTWAIT replaced with socket.setblocking(False)

Even though epoll has a better performance and improved socket handling
than select, this change should not affect the actual test case.
2014-01-25 20:52:42 +01:00
Dan Fandrich 88b074df3f tests: Added missing HTTP proxy keywords 2014-01-25 16:55:05 +01:00