Commit Graph

684 Commits

Author SHA1 Message Date
Marc Hoersken 9819984fbb tests: make it possible to set executable extensions
This enables the use of Windows Subsystem for Linux (WSL) to run the
testsuite against Windows binaries while using Linux servers.

This commit introduces the following environment variables:
- CURL_TEST_EXE_EXT: set the executable extension for all components
- CURL_TEST_EXE_EXT_TOOL: set it for the curl tool only
- CURL_TEST_EXE_EXT_SSH: set it for the SSH tools only

Later testcurl.pl could be adjusted to make use of those variables.
- CURL_TEST_EXE_EXT_SRV: set it for the test servers only

(This is one of several commits to support use of WSL for the tests.)

Closes https://github.com/curl/curl/pull/3899
2019-12-09 19:32:41 -05:00
Marc Hoersken 0783f2e585 tests: use \r\n for log messages in WSL
Bash in Windows Subsystem for Linux (WSL) requires it for some reason.

(This is one of several commits to support use of WSL for the tests.)

Ref: https://github.com/curl/curl/pull/3899
2019-12-09 19:32:28 -05:00
Marcel Raad cebbba9f9d
runtests: get textaware info from curl instead of perl
The MSYS system on Windows can run the test suite for curl built with
any toolset. When built with the MSYS GCC, curl uses Unix line endings,
while it uses Windows line endings when built with the MinGW GCC, and
`^O` reports 'msys' in both cases. Use the curl executable itself to
determine the line endings instead, which reports 'x86_64-pc-msys' when
built with the MSYS GCC.

Closes https://github.com/curl/curl/pull/4506
2019-10-20 13:06:57 +02:00
Stephan Szabo 2aff76c571
tests: support non-localhost HOSTIP for dict/smb servers
smbserver.py/dictserver.py were explicitly using localhost/127.0.0.1 for
binding the server which when we were running the tests with a separate
HOSTIP and CLIENTIP had failures verifying the server from the device we
were testing.

This changes them to take the address from runtests.py and default to
localhost/127.0.0.1 if none is given.

Closes #4048
2019-06-20 08:33:13 +02:00
Daniel Stenberg 6617db6a7e
runtests: keep logfiles around by default
Make '-k' a no-op. The singletest function now clears the log directory
BEFORE each individual test and not after, which makes it possible to
always keep the logfiles around after a test has been run. No need to
specify -k anymore. Keeping the option parsing around to work with users
of old habits.

Some tests also didn't work properly when -k was used (since the old
logs would be kep when a new test starts) which this change also fixes.

Closes #4035
2019-06-18 07:59:45 +02:00
Daniel Stenberg 40259ca655
tests: have runtests figure out disabled features
... 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-17 16:08:00 +02:00
Daniel Stenberg c97e8493a6
runtests: report single test time + total duration
... after each successful test.

Closes #4027
2019-06-15 23:31:41 +02:00
Daniel Stenberg deb9462ff2
wolfssl: refer to it as wolfSSL only
Remove support for, references to and use of "cyaSSL" from the source
and docs. wolfSSL is the current name and there's no point in keeping
references to ancient history.

Assisted-by: Daniel Gustafsson

Closes #3903
2019-06-10 09:18:16 +02:00
Daniel Stenberg a7ae01cb75
runtests: start socksd like other servers
... without a $srcdir prefix. Triggered by the failures in several
autobuilds.

Closes #3781
2019-04-15 11:05:20 +02:00
Daniel Stenberg 54c784556e
test: make tests and test scripts use socksd for SOCKS
Make all SOCKS tests use socksd instead of ssh.
2019-04-13 11:21:53 +02:00
Daniel Stenberg e1be825453
alt-svc: the libcurl bits 2019-03-03 11:17:52 +01:00
Daniel Stenberg 15ef24985c
runtests: detect "schannel" as an alias for "winssl"
Follow-up to 180501cb02

Reported-by: Marcel Raad
Fixes #3609
Closes #3620
2019-02-26 22:18:35 +01:00
Frank Gevaerts 35a8fd2886
tests: add stderr comparison to the test suite
The code is more or less copied from the stdout comparison code, maybe
some better reuse is possible.

test 1457 is adjusted to make the output actually match (by using --silent)
test 506 used <stderr> without actually needing it, so that <stderr> block is removed

Closes #3536
2019-02-11 23:00:50 +01:00
Ladar Levison 53400f5a41 runtests.pl: Fix perl call to include srcdir
- Use explicit include opt for perl calls.

Prior to this change some scripts couldn't find their dependencies.

At the top, perl is called using with the "-Isrcdir" option, and it
works:

https://github.com/curl/curl/blob/curl-7_63_0/tests/runtests.pl#L183

But on line 3868, that option is omitted. This caused problems for me,
as the symbol-scan.pl script in particular couldn't find its
dependencies properly:

https://github.com/curl/curl/blob/curl-7_63_0/tests/runtests.pl#L3868

This patch fixes that oversight by making calls to perl sub-shells
uniform.

Closes https://github.com/curl/curl/pull/3496
2019-02-04 13:02:29 -05:00
Daniel Stenberg 9df8dc101b
url: a short host name + port is not a scheme
The function identifying a leading "scheme" part of the URL considered a
few letters ending with a colon to be a scheme, making something like
"short:80" to become an unknown scheme instead of a short host name and
a port number.

Extended test 1560 to verify.

Also fixed test203 to use file_pwd to make it get the correct path on
windows. Removed test 2070 since it was a duplicate of 203.

Assisted-by: Marcel Raad
Reported-by: Hagai Auro
Fixes #3220
Fixes #3233
Closes #3223
Closes #3235
2018-11-06 19:11:58 +01:00
Daniel Stenberg 302d125b42
axtls: removed
As has been outlined in the DEPRECATE.md document, the axTLS code has
been disabled for 6 months and is hereby removed.

Use a better supported TLS library!

Assisted-by: Daniel Gustafsson
Closes #3194
2018-11-01 10:29:53 +01:00
Daniel Stenberg 8effa8c2b0
runtests: use the local curl for verifying
... revert the mistaken change brought in commit 8440616f53.

Reported-by: Alessandro Ghedini
Bug: https://curl.haxx.se/mail/lib-2018-10/0118.html

Closes #3198
2018-10-31 13:48:56 +01:00
Daniel Gustafsson b6bcb6e689 runtests: skip ld_preload tests on macOS
The LD_PRELOAD functionality doesn't exist on macOS, so skip any tests
requiring it.

Fixes #2394
Closes #3106
Reported-by: Github user @jakirkham
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2018-10-07 22:25:53 +02:00
Marcel Raad 5fdac8d4f9
runtests: use Windows paths for Windows curl
curl generated by CMake's Visual Studio generator has "Windows" in the
version number.
2018-10-04 11:44:32 +02:00
Daniel Stenberg 5cc51b0d0f
runtests: ignore disabled even when ranges are given
runtests.pl support running a range of tests, like "44 to 127". Starting
now, the code makes sure that even such given ranges will ignore tests
that are marked as disabled.

Disabled tests can still be run by explictly specifying that test
number.

Closes #3075
2018-10-02 13:07:06 +02:00
Yiming Jing dd8151d016
runtests.pl: run tests against the MesaLink vtls backend 2018-09-13 08:26:45 +02:00
Daniel Stenberg f7208df7d9
pipelining: deprecated
Transparently. The related curl_multi_setopt() options all still returns
OK when pipelining is selected.

To re-enable the support, the single line change in lib/multi.c needs to
be reverted.

See docs/DEPRECATE.md

Closes #2705
2018-09-05 11:34:03 +02:00
Marcel Raad b842fa3110
Don't use Windows path %PWD for SSH tests
All these tests failed on Windows because something like
sftp://%HOSTIP:%SSHPORT%PWD/
expanded to
sftp://127.0.0.1:1234c:/msys64/home/bla/curl
and then curl complained about the port number ending with a letter.

Use the original POSIX path instead of the Windows path created in
checksystem to fix this.

Closes https://github.com/curl/curl/pull/2920
2018-08-31 09:13:01 +02:00
Daniel Stenberg 8440616f53
http: fix for tiny "HTTP/0.9" response
Deal with tiny "HTTP/0.9" (header-less) responses by checking the
status-line early, even before a full "HTTP/" is received to allow
detecting 0.9 properly.

Test 1266 and 1267 added to verify.

Fixes #2420
Closes #2872
2018-08-13 23:16:01 +02:00
Daniel Stenberg 99ae23c23c
runtests.pl: remove debug leftover from bb9a340c73 2018-06-15 17:26:57 +02:00
Daniel Stenberg bb9a340c73
runtests: support variables in <strippart>
... and make use of that to make 1455 work better without using a fixed
local port number.

Fixes #2649
Closes #2650
2018-06-12 16:11:21 +02:00
Daniel Stenberg c39ed80526
tests: provide 'manual' as a feature to optionally require
... and make test 1026 rely on that feature so that --disable-manual
builds don't cause test failures.

Reported-by: Max Dymond and Anders Roxell
Fixes #2533
Closes #2540
2018-04-29 12:49:38 +02:00
Michael Kaufmann 9645f18f25 runtests.pl: fix warning 'use of uninitialized value'
follow-up to a9a7b60

Closes #2428
2018-03-26 22:11:54 +02:00
Daniel Stenberg a9a7b606c2
transfer: make HTTP without headers count correct body size
This is what "HTTP/0.9" basically looks like.

Reported on IRC

Closes #2382
2018-03-15 10:56:27 +01:00
Travis Burtrum e178fbd40a
SChannel/WinSSL: Implement public key pinning
Closes #1429
2018-01-25 22:14:39 +01:00
Daniel Stenberg 993dd5651a
curl: progress bar refresh, get width using ioctl()
Get screen width from the environment variable COLUMNS first, if set. If
not, use ioctl(). If nether works, assume 79.

Closes #2242

The "refresh" is for the -# output when no total transfer size is
known. It will now only use a single updated line even for this case:

The "-=O=-" ship moves when data is transferred. The four flying
"hashes" move (on a sine wave) on each refresh, independent of data.
2018-01-22 08:29:37 +01:00
Patrick Monnerat 11bf1796cd HTTP: implement Brotli content encoding
This uses the brotli external library (https://github.com/google/brotli).
Brotli becomes a feature: additional curl_version_info() bit and
structure fields are provided for it and CURLVERSION_NOW bumped.

Tests 314 and 315 check Brotli content unencoding with correct and
erroneous data.

Some tests are updated to accomodate with the now configuration dependent
parameters of the Accept-Encoding header.
2017-11-05 15:28:16 +01:00
Dan Fandrich 89116e3422 runtests.pl: Fixed typo in message 2017-10-30 16:56:42 +01:00
Patrick Monnerat 7363d5a928 runtests: support MultiSSL client feature 2017-10-19 20:15:21 +01:00
Daniel Stenberg ed0b6b18f6
runtests: use valgrind for torture as well
NOTE: it makes them terribly slow. I recommend only using valgrind for
specific torture tests or using lots of patience.
2017-10-14 17:40:21 +02:00
Daniel Stenberg ad164eceb3
memdebug: trace send, recv and socket
... to allow them to be included in torture tests too.

closes #1980
2017-10-14 17:40:12 +02:00
Isaac Boukris 56d949d31a
tests: add initial gssapi test using stub implementation
The stub implementation is pre-loaded using LD_PRELOAD
and emulates common gssapi uses (only builds if curl is
initially built with gssapi support).

The initial tests are currently disabled for debug builds
as LD_PRELOAD is not used then.

Ref: https://github.com/curl/curl/pull/1687
2017-09-15 14:09:08 +02:00
Patrick Monnerat 3bbe894fd2 runtests.pl: support attribute "nonewline" in part verify/upload. 2017-09-05 17:33:16 +01:00
Patrick Monnerat 989e4d4a31 runtests.pl: allow <file[1-4]> tags in client section.
This enables tests to create more than one file on the client side.
2017-09-02 12:57:13 +01:00
Patrick Monnerat f0cda34145 runtests.pl: Apply strippart to upload too.
This will allow substitution of boundaries in mail messages.
2017-09-02 12:55:28 +01:00
Dan Fandrich b9e22e9575 runtests: fixed case insensitive matching of keywords
Commit 5c2aac71 didn't work in the case of mixed-case keywords given on
the command-line.
2017-08-19 22:07:15 +02:00
Daniel Stenberg 5c2aac7162
runtests: match keywords case insensitively 2017-08-14 23:05:11 +02:00
Viktor Szakats 13ef623a81
docs/comments: Update to secure URL versions
Closes #1741
2017-08-08 21:41:07 +02:00
Max Dymond 06a6feba9d test1452: add telnet negotiation
Add a basic telnet server for negotiating some telnet options before
echoing back any data that's sent to it.

Closes #1645
2017-07-07 11:00:26 +02:00
Daniel Stenberg 759efe7b51 runtests: support "threaded-resolver" as a feature
... to let tests require it or skip if present
2017-07-06 11:49:50 +02:00
Max Dymond a6f8d27efc test1451: add SMB support to the testbed
Add test 1451 which does some very basic SMB testing using the impacket
SMB server.

Closes #1630
2017-07-04 10:41:58 +02:00
Max Dymond 9b387034ab test1450: add simple testing for DICT
Add a new server which provides a DICT interface. This is intended to
begin coverage testing for lib/dict.c

Closes #1615
2017-06-30 11:34:05 +02:00
Dan Fandrich 01f9487967 runtests.pl: removed <precommand> feature
This hasn't been used in over a decade. <precheck> can still be used to
run commands before the main test.
2017-05-28 20:57:47 +02:00
Dan Fandrich 14514c9796 runtests.pl: removed unused arguments to valgrindparse 2017-05-27 14:30:24 +02:00
Travis Burtrum eb16305e6a SecureTransport/DarwinSSL: Implement public key pinning
Closes #1400
2017-05-15 22:54:33 +02:00
Dan Fandrich fa0ac3f4d9 tests: made a couple of prechecks consistent with others
Also removed a TODO suggesting caching the precheck results. Tests
showed this would save about 0.1 sec on the total test run time on a
relatively modern system, an unnoticeable gain at the cost of longer and
more complicated code. There would also be a danger that a cached test
result would be inappropriately returned, such as when other test
dependencies (like environment variables) are different or when the
precheck causes side effects (like filesystem changes).
2017-05-13 19:12:22 +02:00
Daniel Stenberg e3f84efc32 runtests: fix "use of undefined value" warning in -R handling 2017-05-08 10:09:06 +02:00
Dan Fandrich ba5fa1c7a8 runtests.pl: simplify the datacheck read section
Also, document that numbered datacheck sections are possible.
2017-05-06 09:04:00 +02:00
Daniel Stenberg 1ef38a95d2 runtests: use -R for random order
Suggested-by: Dan Fandrich
2017-05-05 08:12:24 +02:00
Daniel Stenberg 067b8f2304 runtests: add -o to run test cases in scrambled order
... instead of numerical order.

Closes #1466
2017-05-04 23:36:57 +02:00
Dan Fandrich 2ce86d8509 runtests.pl: support multiline <postcheck> commands 2017-04-29 10:00:15 +02:00
Dan Fandrich de2b31aa5a runtests.pl: fixed display of the Gopher IPv6 port number 2017-03-20 23:37:57 +01:00
Dan Fandrich 41388b9ba3 tests: enable HTTP/2 tests to run with non-default port numbers 2017-02-27 22:32:37 +01:00
Daniel Stenberg 5c823f51db runtests: remove the valgrind parser
Old legacy parsing that 1) hid problems for us and 2) probably isn't
needed anymore.
2016-12-21 23:42:43 +01:00
Dan Fandrich 42253ad943 runtests: made Servers: output be more consistent by removing OFF 2016-11-30 22:39:39 +01:00
Daniel Stenberg 5f2e3b8867 tests: fix the HTTP/2 tests
The HTTP/2 tests brought with commit bf05606ef1 were using the internal
name 'http2' for the HTTP/2 server, while in fact that name was already
used for the second instance of the HTTP server. This made tests using
the second instance (like test 2050) fail after a HTTP/2 test had run.

The server is now known as HTTP/2 internally and within the <server>
section in test cases. 1700, 1701 and 1702 were updated accordingly.
2016-06-19 23:59:52 +02:00
Daniel Stenberg 320905a345 runtests: don't display logs when http2 server fails to start 2016-06-06 23:51:49 +02:00
Daniel Stenberg d3b5c153af runtests: make stripfile work on stdout as well
... and have test 1700 use that to strip out the nghttpx server: headers
2016-06-06 23:51:49 +02:00
Daniel Stenberg bf05606ef1 http2-tests: test1700 is the first real HTTP/2 test
It requires that 'nghttpx' is in the PATH, and it will run the tests
using nghttpx as a front-end proxy in front of the standard HTTP/1 test
server. This uses HTTP/2 over plain TCP.

If you like me have nghttpx installed in a custom path, you can run test 1700
like this:

$ PATH=$PATH:$HOME/build-nghttp2/bin/ ./runtests.pl 1700
2016-06-06 23:51:49 +02:00
Karlson2k 221deef580 tests: Use 'pathhelp' for current path in runtests.pl 2016-04-29 23:42:44 +02:00
Travis Burtrum 33623d7196 PolarSSL: Implement public key pinning 2016-04-24 12:27:39 +02:00
Daniel Stenberg 42a93d4364 runtests: mention when run event-based 2016-03-14 15:39:16 +01:00
Karlson2k 527e86b054 runtests: Fixed usage of %PWD on MinGW64
Closes #672
2016-02-22 00:07:32 +01:00
Daniel Stenberg 4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Jay Satiro 036c465e88 runtests: Add mbedTLS to the SSL backends
.. and enable SSLpinning tests for mbedTLS, BoringSSL and LibreSSL.
2016-01-10 02:56:26 -05:00
Marc Hoersken a9ebd1bddc runtests.pl: check up to 5 data parts with different text modes
Move the text-mode conversion for reply/replycheck from the verify
section into the load section and add support for 4 more check parts.
2015-12-26 11:01:47 +01:00
Daniel Stenberg a7c4bcd971 runtests: more compact "System characteristics" output
- no point in repeating curl features that is already listed as features
  from the curl -V output

- remove the port numbers/unix domain path from the output unless
  verbose is used, as that is rarely interesting to users.
2015-11-12 15:32:48 +01:00
Daniel Stenberg 3c24400636 runtests: rename conditional curl-features to $has_[name] 2015-11-12 14:50:13 +01:00
Tim Rühsen e77b5b7453 cookies: Add support for Mozilla's Publix Suffix List
Use libpsl to check the domain value of Set-Cookie headers (and cookie
jar entries) for not being a Publix Suffix.

The configure script checks for "libpsl" by default. Disable the check
with --without-libpsl.

Ref: https://publicsuffix.org/
Ref: https://github.com/publicsuffix/list
Ref: https://github.com/rockdaboot/libpsl
2015-10-17 16:37:49 +02:00
Jay Satiro c6ff538ebd runtests: Fix pid check in checkdied
Because the 'not' operator has a very low precedence and as a result the
entire statement was erroneously negated and could never be true.
2015-09-29 22:08:57 -04:00
Jay Satiro 22cb631198 runtests: Allow for spaces in server-verify curl custom path 2015-08-22 21:19:34 -04:00
Jay Satiro 606b29fe0d runtests: Allow for spaces in curl custom path
.. also fix some typos in test's FILEFORMAT spec.
2015-07-16 22:21:07 -04:00
Daniel Stenberg d69eee0964 runtests.pl: use 'h2c' now, no -14 anymore 2015-05-18 10:10:55 +02:00
Daniel Stenberg c0700e3c7f runtests: use a DISABLED.local file too
... and have git ignore that. Allows for a dev to add tests to ignore in
local tests and yet don't obstruct a normal git work flow.
2015-04-26 19:59:13 +02:00
Jay Satiro 0675abbc75 cyassl: Implement public key pinning
Also add public key extraction example to CURLOPT_PINNEDPUBLICKEY doc.
2015-04-22 17:07:19 -04:00
Kamil Dudka b47c17d67c nss: implement public key pinning for NSS backend
Bug: https://bugzilla.redhat.com/1195771
2015-04-22 13:21:31 +02:00
Dan Fandrich 9a743bc5fc runtests.pl: detect WolfSSL as yassl 2015-03-28 00:26:45 +01:00
Daniel Stenberg 153e9c0278 runtests: identify BoringSSL and libressl 2015-01-28 10:10:59 +01:00
Steve Holme 151ae59436 code/docs: Use correct case for IPv4 and IPv6
For consistency, as we seem to have a bit of a mixed bag, changed all
instances of ipv4 and ipv6 in comments and documentations to use the
correct case.
2014-12-27 11:31:55 +00:00
Steve Holme bde08d216c runtests: Fixed detection of Unix Sockets feature
...following change in curl --version output.
2014-12-27 10:40:41 +00:00
Steve Holme 1abe65d928 code/docs: Use Unix rather than UNIX to avoid use of the trademark
Use Unix when generically writing about Unix based systems as UNIX is
the trademark and should only be used in a particular product's name.
2014-12-26 21:42:44 +00:00
Marc Hoersken 0114889456 tests: support spaces in paths to SSH, SSHD and SFTP binaries
First patch to enable Windows support using Cygwin-based OpenSSH.
2014-12-21 03:52:36 +01:00
Stefan Bühler 557ca620e4 fix gdb libtool invocation path 2014-12-04 14:38:15 -08:00
Peter Wu f1cc2a2c0c tests: add HTTP UNIX socket server testing support
The variable `$ipvnum` can now contain "unix" besides the integers 4
and 6 since the variable. Functions which receive this parameter
have their `$port` parameter renamed to `$port_or_path` to support a
path to the UNIX domain socket (as a "port" is only meaningful for TCP).

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-04 02:52:19 +01:00
Peter Wu 86981ac9f5 runtests.pl: fix startup of IPv6 servers
Commit curl-7_23_1-143-g8218064 changed the parameter of
responsive_http_server to accept types other than IPv6 (converting
from a boolean to a string), but only considered the lower-case "ipv6"
and not the "IPv6" variant. This caused all servers to start in IPv4
mode instead.

This patch converts the remaining cases to "ipv6". While not strictly
necessary for the run*server variants, these got also converted for
consistency and to prevent future errors.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-28 23:49:10 +01:00
Peter Wu bb6047cd64 runtests.pl: fix warning message, remove duplicate value
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-11-28 23:49:10 +01:00
Steve Holme 85070e46cc runtests.pl: Re-aligned feature support comments 2014-11-22 23:17:59 +00:00
Steve Holme 9ce5e89fcc runtests.pl: Use Kerberos and SPNEGO as proxies for the crypto feature
In addition to NTLM, use Kerberos and SPNEGO as proxies to the crypto
feature.

...and converted tab characters, from commit 4b4e8a5853, to spaces.
2014-11-22 17:14:11 +00:00
Steve Holme 2e2f981bcc runtests.pl: Added support for SPNEGO 2014-11-22 13:52:57 +00:00
Steve Holme 8cc7e74a8f runtests.pl: Added Kerberos detection 2014-11-22 12:26:59 +00:00
Steve Holme 5b437c7637 runtests.pl: Added GSS-API detection 2014-11-22 12:12:42 +00:00
Daniel Stenberg 07e0957e1f test1800: first plain-text http2 test case
Verifies the upgrade request, but gets a plain 1.1 response
2014-11-20 23:33:34 +01:00
Daniel Stenberg 445aab4b73 tests: add new feature 'SSLpinning'
... and make test 2034 and 2035 require it, and have it set when built
with OpenSSL or GnuTLS.
2014-11-04 23:02:09 +01:00
Fabian Keil 40e13829af runtests.pl: Pad test case numbers with up to three zeroes
Test case numbers with four digits have been available for a
while now.
2014-08-07 10:17:25 +02:00
Fabian Keil 2fab0d45a9 runtests.pl: Remove filteroff() which hasn't been used since 2001 2014-07-26 23:02:50 +02:00
Fabian Keil dc7a598126 runtests.pl: Don't expect $TESTDIR/DISABLED to exist
If a non-standard $TESTDIR is used the file may not be necessary.

Previously a "missing" file resulted in the warning:
readline() on closed filehandle D at ./runtests.pl line 4940.
2014-07-26 23:01:31 +02:00
Dan Fandrich 447c31ce9d gnutls: explicitly added SRP to the priority string
This seems to have become necessary for SRP support to work starting
with GnuTLS ver. 2.99.0. Since support for SRP was added to GnuTLS
before the function that takes this priority string, there should be no
issue with backward compatibility.
2014-07-12 00:11:44 +02:00
Dan Fandrich d582c272a6 tests: adjust for capitalization differences in newer gnutls-serv 2014-07-11 23:47:48 +02:00
Daniel Stenberg e95ca7cec9 NTLM: set a fake entropy for debug builds with CURL_ENTROPY set
Curl_rand() will return a dummy and repatable random value for this
case. Makes it possible to write test cases that verify output.

Also, fake timestamp with CURL_FORCETIME set.

Only when built debug enabled of course.

Curl_ssl_random() was not used anymore so it has been
removed. Curl_rand() is enough.

create_digest_md5_message: generate base64 instead of hex string

curl_sasl: also fix memory leaks in some OOM situations
2014-06-11 23:15:48 +02:00
Steve Holme 51bb067a42 Curl_rand: Use a fake entropy for debug builds when CURL_ENTROPY set 2014-06-11 21:13:40 +01:00
Dan Fandrich a917f30c6b runtests.pl: Improved the check for a crash during torture tests 2014-04-29 00:06:32 +02:00
Daniel Stenberg d73d633885 runtests: insist on a <keywords> section
Since all present tests now have <keywords> listed, this script will now
refuse to run a given test case if no such section is provided.
Hopefully this will help us make sure new test cases get keywords added
at start.
2014-04-03 11:33:41 +02:00
Daniel Stenberg c1f7da1570 runtests: check protocol before data
When the protocol part fails, the data usually does too but the protocol
part is often more fundamental and often provide the clues you need to
fix the test case.
2014-03-30 23:16:21 +02:00
Daniel Stenberg 2fc31dcf74 runtests.pl: verify specified test cases
To better allow arguments like "1 to 9999" without flooding the terminal
with error messages, the given test cases range is now checked and only
test numbers with existing files are actually run.
2014-03-19 23:28:28 +01:00
Dan Fandrich 4b4e8a5853 tests: Made the crypto test feature usable
This feature specifies the availability of cryptographic
authentication, which can be disabled at compile-time
2014-02-17 09:50:46 +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
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
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 18b540f9d1 runtests: detect 'ares' better
... caused false detections of the threaded resolver otherwise
2014-02-05 23:36:16 +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 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 0d959c64b2 runtests: Don't log command every torture iteration in verbose 2014-01-24 23:35:44 +01:00
Daniel Stenberg 31075a8897 runtests: disable memory tracking with threaded resolver
The built-in memory debug system doesn't work with multi-threaded use so
instead of causing annoying false positives, disable the memory tracking
if the threaded resolver is used.
2014-01-08 13:20:29 +01:00
Steve Holme 3bc349b53b runtests.pl: Updated copyright year after edit from d718abd968 2014-01-05 11:32:48 +00:00
Marc Hoersken d718abd968 runtests.pl: check for tstunnel command on Windows
The Windows console version of stunnel is called "tstunnel", while
running "stunnel" on Windows spawns a new console window which
cannot be handled by the testsuite.
2014-01-05 02:22:09 +01:00
Steve Holme 5107d66b2e runtests.pl: Fixed slightly incorrect regex in commit 28dd47d4d4 2013-12-28 16:32:07 +00:00
Steve Holme 28dd47d4d4 runtests.pl: Optimised feature present checking code
...to exclude not present features.
2013-12-28 12:35:51 +00:00
Steve Holme 147b2a546e runtests.pl: Added the ability to run tests when a feature is not present 2013-12-28 11:18:54 +00:00
Steve Holme 263616202b ftpserver.pl: Reworked SMTP verified server detection
Following the addition of informational commands to the SMTP protocol,
the test server is no longer required to return the verified server
information in responses that curl only outputs in verbose mode.

Instead, a similar detection mechanism to that used by FTP, IMAP and
POP3 can now be used.
2013-12-27 18:15:04 +00:00
Steve Holme c19cfb79db runtests.pl: Added SSPI detection 2013-11-12 12:48:28 +00:00
Steve Holme 04064e89c1 runtests.pl: Fixed syntax error in commit c873375123
Possible unintended interpolation in string at line 796
2013-09-18 19:32:20 +01:00
Steve Holme c873375123 runtests.pl: Fixed smtp mail from address
Following changes to ftpserver.pl fixed the mail from address to be a
correctly formatted address otherwise the server response will be 501
Invalid address.
2013-09-18 18:04:26 +01:00
Daniel Stenberg 63d8b3a507 runtests.pl: allow -vc point to a separate curl binary to verify with
The specified curl binary will then be used to verify the running
server(s) instead of the development version. This is very useful in
some cases when the development version fails to verify correctly as
then the test case may not run at all.

The actual test will still be run with the "normal" curl executable
(unless the test case specifies something differently).
2013-08-26 11:38:38 +02:00
Daniel Stenberg 6cf8413e31 curl_easy_perform_ev: debug/test function
This function is meant to work *exactly* as curl_easy_perform() but will
use the event-based libcurl API internally instead of
curl_multi_perform(). To avoid relying on an actual event-based library
and to not use non-portable functions (like epoll or similar), there's a
rather inefficient emulation layer implemented on top of Curl_poll()
instead.

There's currently some convenience logging done in curl_easy_perform_ev
which helps when tracking down problems. They may be suitable to remove
or change once things seem to be fine enough.

curl has a new --test-event option when built with debug enabled that
then uses curl_easy_perform_ev() instead of curl_easy_perform(). If
built without debug, using --test-event will only output a warning
message.

NOTE: curl_easy_perform_ev() is not part if the public API on purpose.
It is only present in debug builds of libcurl and MUST NOT be considered
stable even then. Use it for libcurl-testing purposes only.

runtests.pl now features an -e command line option that makes it use
--test-event for all curl command line tests. The man page is updated.
2013-08-20 11:56:06 +02:00
Daniel Stenberg 51b0f09b5e runtests.pl: support nonewline="yes" in client/stdin sections 2013-05-07 22:52:43 +02:00
Daniel Stenberg 27777949a0 runtests: log more commands in verbose mode
... to aid tracking down failures
2013-04-25 23:40:01 +02:00
Marc Hoersken e34bc917d6 runtests.pl: Fixed --verbose parameter passed to http_pipe.py 2013-04-06 20:24:10 +02:00
Marc Hoersken a03d0c5b88 runtests.pl: Modularization of MinGW/Msys compatibility functions 2013-04-06 12:45:05 +02:00
Yang Tse 1700668d78 tests: add #96 #558 and #1330
These verfy that the 'memory tracking' subsystem is actually doing its
job when using curl tool (#96), a test in libtest (#558) and also a unit
test (#1330), in order to prevent regressions in this functionallity.
2013-03-15 19:59:51 +01:00
Linus Nielsen Feltzing 0f147887b0 Multiple pipelines and limiting the number of connections.
Introducing a number of options to the multi interface that
allows for multiple pipelines to the same host, in order to
optimize the balance between the penalty for opening new
connections and the potential pipelining latency.

Two new options for limiting the number of connections:

CURLMOPT_MAX_HOST_CONNECTIONS - Limits the number of running connections
to the same host. When adding a handle that exceeds this limit,
that handle will be put in a pending state until another handle is
finished, so we can reuse the connection.

CURLMOPT_MAX_TOTAL_CONNECTIONS - Limits the number of connections in total.
When adding a handle that exceeds this limit,
that handle will be put in a pending state until another handle is
finished. The free connection will then be reused, if possible, or
closed if the pending handle can't reuse it.

Several new options for pipelining:

CURLMOPT_MAX_PIPELINE_LENGTH - Limits the pipeling length. If a
pipeline is "full" when a connection is to be reused, a new connection
will be opened if the CURLMOPT_MAX_xxx_CONNECTIONS limits allow it.
If not, the handle will be put in a pending state until a connection is
ready (either free or a pipe got shorter).

CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - A pipelined connection will not
be reused if it is currently processing a transfer with a content
length that is larger than this.

CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - A pipelined connection will not
be reused if it is currently processing a chunk larger than this.

CURLMOPT_PIPELINING_SITE_BL - A blacklist of hosts that don't allow
pipelining.

CURLMOPT_PIPELINING_SERVER_BL - A blacklist of server types that don't allow
pipelining.

See the curl_multi_setopt() man page for details.
2013-03-13 23:55:24 +01:00
Nick Zitzmann cc27aff7b3 darwinssl: fix undefined $ssllib warning in runtests.pl
I also added --with-darwinssl to the list of SSL options in configure.
2013-02-24 15:39:15 -07:00
Yang Tse ccb34cb46d runtests.pl: make VPATH builds find valgrind.supp 2013-01-18 11:20:41 +01:00
Daniel Stenberg c43127414d always-multi: always use non-blocking internals
Remove internal separated behavior of the easy vs multi intercace.
curl_easy_perform() is now using the multi interface itself.

Several minor multi interface quirks and bugs have been fixed in the
process.

Much help with debugging this has been provided by: Yang Tse
2013-01-17 19:40:35 +01:00
Yang Tse dfe4769157 build and tests: curl_10char_object_name() shell function
lib/objnames.inc provides definition of curl_10char_object_name() shell
function. The intended purpose of this function is to transliterate a
(*.c) source file name that may be longer than 10 characters, or not,
into a string with at most 10 characters which may be used as an OS/400
object name.

Test case 1221 does unit testng of this function and also verifies
that it is possible to generate distinct short object names for all
curl and libcurl *.c source file names.

lib/objnames-test.sh is the shell script used for test case 1221.

tests/runtests.pl modified to accept shell script test cases.

More details inside lib/objnames.inc and lib/objnames-test.sh
2013-01-02 20:15:50 +01:00
Yang Tse dfe382c6ae runtests.pl: prepend $srcdir to HTTPTLS server config files path 2012-12-22 00:26:03 +01:00
Fabian Keil ca5f4e2135 runtests and friends: Do not add undefined values to @INC
On FreeBSD this fixes the warning:
Use of uninitialized value $p in string eq at /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm line 36.
2012-12-06 23:04:33 +01:00
Daniel Stenberg 14dc679ce0 test: offer "automake" output and check for perl better
runtests.pl -am now uses the "PASS/FAIL: [desc]" output for each
executed test. You can run 'make test-am' in the root build directory to
invoke that. The reason for this output style is to better allow generic
test suite parsers to also grok our test output.

The test Makefile now also tests that perl was indeed found and that the
PERL variable points to an executable before it tries to run the main
test perl script runtests.pl,
2012-11-23 11:56:26 +01:00
Daniel Stenberg e62ee60c7a runtests: limit execessive logging/output 2012-11-12 13:50:00 +01:00
Joe Mason 76ba591957 Remove the --fork option of sws, since it makes refactoring to use poll more complicated and should
be redundant once we poll
2012-08-02 17:34:45 -04:00
Guenter Knauf e1711b0e9a Fixed MSYS <-> Windows path convertion.
Replaced the Windows real path from mount hack with a more
reliable and simpler hack: the MSYS shell has a builtin pwd
which understands a -W option which does convertion to Windows
paths. Tested and confirmed that this works on all MSYS versions
I have back to a 3 year old one.
2012-07-20 15:30:41 +02:00
Guenter Knauf c27cc4cfe0 Follow-up fix to detect SSL libs with MinGW.
1) the check for winssl needs to come before nss check
2) the SSL checks must begin with a new if or else we will
never find any SSL lib with MinGW.
2012-07-19 16:31:08 +02:00
Guenter Knauf da2bde9d62 Trial to teach runtests.pl about WinSSL. 2012-07-17 07:13:58 +02:00
Guenter Knauf 13abfd997e Fixed warning 'uninitialized value in numeric gt'.
This is a MSYS/MinGW-only warning; full warning text is:
Use of uninitialized value in numeric gt (>) at ../../curl/tests/runtests.pl line 2227.
2012-07-17 06:55:38 +02:00
Tatsuhiro Tsujikawa a3e3f8ffa0 runtests.pl: make it support metalink feature 2012-06-20 20:15:42 +02:00
Yang Tse 62f374b19e tests: adjust file part behavior in test verify section.
When a <file> part is now specified with no contents at all, this
will actually verify that the specified file has no contents at all.
Previously file contents would be ignored.
2012-06-05 20:20:39 +02:00