1
0
mirror of https://github.com/moparisthebest/curl synced 2024-10-31 23:55:01 -04:00
Commit Graph

557 Commits

Author SHA1 Message Date
Yang Tse
c49e9683b8 build: libhostname linkage adjustments followup 2010-08-08 02:59:55 +02:00
Yang Tse
af4eae77ac build: chkhostname build adjustments followup 2010-08-07 17:39:36 +02:00
U-D5B1PQ1J\Administrador
7d342c723c build: allow NTLM tests to run on more build configurations 2010-08-07 15:03:54 +02:00
Yang Tse
59bad26bb2 build: ensure that libhostname doesn't get installed 2010-08-06 18:40:13 +02:00
Yang Tse
1cbe66fbc8 build: remove unused file 2010-08-04 18:54:45 +02:00
Daniel Stenberg
687df5c8c3 sethostname: provide local prototype for gethostname
This is only to avoid warnings on some systems.
2010-08-02 22:51:24 +02:00
Daniel Stenberg
d296dd4ee8 sethostname: avoid including unistd.h to duck for warnings 2010-07-30 22:32:57 +02:00
Daniel Stenberg
04eff9beb9 sethostname: ISO C does not allow extra `;' outside of a function 2010-07-30 22:26:19 +02:00
Kamil Dudka
b5c3feda17 NTLM tests: boost coverage by forcing the hostname
A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM
test-cases to override the system implementation of gethostname().  It
makes it possible to test the NTLM authentication for exact match, and
this way test the implementation of MD4 and DES.

If LD_PRELOAD doesn't work, a debug build willl also workk as debug
builds are now made to prefer a specific environment variable and will
then return that content as host name instead of the actual one.

Kamil wrote the bulk of this, Daniel Stenberg polished it.
2010-07-30 00:51:24 +02:00
Kamil Dudka
d63bdba097 test575: do not fail with threaded DNS resolver 2010-06-17 17:07:15 +02:00
Yang Tse
12043e3c9c fix compiler warning: external declaration in primary source file 2010-05-31 16:58:24 +02:00
Yang Tse
a324fa7b97 fix compiler warning: variable was set but never used 2010-05-31 16:51:36 +02:00
Kamil Dudka
35955179c6 CURL_LLONG_MAX: avoid constant overflow
... when (CURL_SIZEOF_CURL_OFF_T == 4)
2010-05-29 21:23:18 +02:00
Kamil Dudka
75743b009b lib577: avoid redefinition of ERROR 2010-05-28 00:50:11 +02:00
Tor Arntsen
eadeb5bd9a lib573: do not compare double for exact match 2010-05-27 20:20:08 +02:00
Tor Arntsen
22f3b01478 Test 573: Use correct type for CURLINFO_CONNECT_TIME
curl_easy_getinfo() called with a pointer to long instead of double
would sigbus on RISC processors (e.g. MIPS) due to wrong alignment
of pointer address.
2010-05-20 17:12:53 +02:00
Kamil Dudka
2ffe834bff ftp wildcard: a new option CURLOPT_FNMATCH_DATA 2010-05-16 02:52:33 +02:00
Dan Fandrich
43b816538f Fixed test 577 to work when --enable-hidden-symbols is configured 2010-05-14 14:42:58 -07:00
Pavel Raiskup
0825cd80a6 FTP: WILDCARDMATCH/CHUNKING/FNMATCH added 2010-05-12 23:17:51 +02:00
Daniel Stenberg
adaf87530d multi interface: missed storing connection time
Dirk Manske reported a regression. When connecting with the multi
interface, there were situations where libcurl wouldn't store
connect time correctly as it used to (and is documented to) do.

Using his fine sample program we could repeat it, and I wrote up
test case 573 using that code. The problem does not easily show
itself using the local test suite though.

The fix, also as suggested by Dirk, is a bit on the ugly side as
it adds yet another call to Curl_verboseconnect() and setting the
TIMER_CONNECT time.  That situation is subject for some closer
inspection in the future.
2010-05-07 23:49:29 +02:00
Kamil Dudka
d487ade72c test536: do not fail with threaded DNS resolver
Also tweaked comments in certain examples using curl_multi_fdset().
2010-04-24 12:14:21 +02:00
Dan Fandrich
f38510f4b5 Eliminated an unlikely race condition in some tests.
Based on a patch from the FreeBSD ports by Peter Pentchev.
2010-04-15 10:51:03 -07:00
Dan Fandrich
8c6793d79a Call curl_global_cleanup() in test 560 to avoid a memory leak 2010-03-30 12:52:44 -07:00
Dan Fandrich
643ae2ca8b Allow test 538 to run even when proxy support is disabled 2010-03-30 11:40:34 -07:00
Daniel Stenberg
05de2cf180 remove all .cvsignore files 2010-03-25 23:22:03 +01:00
Daniel Stenberg
a1a66c7cd6 s/CVS/DEV in the version string from the git repo 2010-03-25 10:38:17 +01:00
Chris Conroy
c869ae7447 remove debug printfs 2010-03-24 15:12:49 +01:00
Daniel Stenberg
8aa68b4cad remove trace of CVS 2010-03-24 13:27:49 +01:00
Chris Conroy
1ac168e576 Fix RTSP GET_PARAMETER empty and non-empty operation.
Test coverage included. Thanks to Massimo Callegari for the bug report
2010-03-24 13:21:14 +01:00
Daniel Stenberg
50b51161c9 s/CVS/DEV/ in the version string for repo versions 2010-03-24 11:30:34 +01:00
Daniel Stenberg
2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Daniel Stenberg
b33ddd615a ignore more files generated when tests run in the source tree 2010-03-23 12:43:42 +01:00
Yang Tse
46b112bcd4 replaced tabs with spaces 2010-02-16 13:32:45 +00:00
Yang Tse
a07bc79117 removed trailing whitespace 2010-02-14 19:40:18 +00:00
Yang Tse
0f4a91afde OOM handling fix 2010-02-06 13:21:45 +00:00
Yang Tse
2c2464a682 fix compiler warning 2010-02-05 20:52:00 +00:00
Yang Tse
880452d2ed fix compiler warning 2010-02-05 19:24:22 +00:00
Yang Tse
e3009f2950 fix compiler warning 2010-02-05 19:19:34 +00:00
Yang Tse
cad9c3f55f Addes OOM handling for curl_easy_setopt() calls in test 2010-02-05 18:07:19 +00:00
Yang Tse
1a5749424b Fix variable initialization 2010-02-04 14:50:58 +00:00
Yang Tse
a9a5a8e45c Modified test case 557 to additionally verify libcurl's internal curl_m*printf()
functions formatting functionality when handling signed and unsigned shorts.
2010-02-04 14:41:01 +00:00
Yang Tse
381a4d6efe Fix portability issue related with unaligned memory access 2010-02-03 06:49:27 +00:00
Yang Tse
232d17ec64 avoid possibility of using obsoleted stuff 2010-02-02 12:39:10 +00:00
Yang Tse
bafba6946c remove setup.h inclusion which is already done from test.h inclusion 2010-02-02 12:36:16 +00:00
Yang Tse
9f6c4daa27 include headers 2010-02-02 07:01:21 +00:00
Yang Tse
ea72194650 Conroy added a check to the coded message size since the docs stipulate
that each call will contain a full protocol packet.
2010-02-01 22:14:22 +00:00
Yang Tse
eff18763a1 portability fix 2010-01-28 10:27:09 +00:00
Yang Tse
6259bcd51f Chris Conroy provided first RTSP tests 2010-01-28 04:58:03 +00:00
Yang Tse
55e68ba333 I removed leading 'curl' path on the 'curlbuild.h' include statement in
curl.h, adjusting auto-makefiles include path, to enhance portability to
OS's without an orthogonal directory tree structure such as OS/400.
2009-11-05 15:04:03 +00:00
Daniel Stenberg
223d848104 - Gabriel Kuri reported a problem with CURLINFO_CONTENT_LENGTH_DOWNLOAD if the
download was 0 bytes, as libcurl would then return the size as unknown (-1)
  and not 0. I wrote a fix and test case 566 to verify it.
2009-10-31 18:51:50 +00:00
Daniel Stenberg
2c0b65d37b Added test case 566 in an attempt to repeat bug 2884561
(http://curl.haxx.se/bug/view.cgi?id=2884561) but it seems to work for me...
2009-10-30 22:38:21 +00:00
Daniel Stenberg
d68f215f03 - "Tom" posted a bug report that mentioned how libcurl did wrong when doing a
POST using a read callback, with Digest authentication and
  "Transfer-Encoding: chunked" enforced.  I would then cause the first request
  to be wrongly sent and then basically hang until the server closed the
  connection. I fixed the problem and added test case 565 to verify it.
2009-10-30 22:24:48 +00:00
Yang Tse
640e49976f Fix compiler warning: loop without body 2009-10-10 12:29:32 +00:00
Daniel Stenberg
1d92cf1dab disable the tests that differ between 32 and 64 bit 2009-08-27 18:15:38 +00:00
Daniel Stenberg
be2fcbcbf1 Added a range of new fun date strings to try. This set of dates come from a
mail posted to the http-state mailing list, from Adam Barth, and is said to be
the set of date formats the Chrome browser code is tested against:
http://www.ietf.org/mail-archive/web/http-state/current/msg00129.html

libcurl parses most of them identically, but not all of them.
2009-08-12 11:18:55 +00:00
Daniel Stenberg
9cff716925 don't set READDATA since it isn't used and only confuses readers 2009-07-22 22:08:01 +00:00
Bill Hoffman
a8ea1e9ef4 ENH: add optional support for c-ares 2009-07-14 19:03:31 +00:00
Gunter Knauf
f671d0513c renamed generated config.h to curl_config.h in order to avoid clashes when libcurl is used with other projects which also have a config.h. 2009-07-14 13:25:14 +00:00
Yang Tse
1d97f13462 TrackMemory is another feature not supported by curl-config 2009-06-10 04:06:06 +00:00
Bill Hoffman
744dceaffe ENH: lower case cmake functions and remove tabs and re-indent cmake code 2009-06-09 17:29:16 +00:00
Yang Tse
8d581f7fe4 Revert delegating c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.

This embedded c-ares linking is again handled from the configure script.
2009-06-06 13:20:39 +00:00
Yang Tse
13fdb9d8a5 c-ares embbeded builds header include paths fully defined in makefiles 2009-06-04 04:13:39 +00:00
Yang Tse
cd5e6743f7 Delegate c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.
2009-05-30 15:56:42 +00:00
Yang Tse
90cd2a4753 fix compiler warning: unused variable 2009-05-15 10:16:33 +00:00
Daniel Stenberg
e6e6c6e635 Added test 564 as DISABLED. It is for testing FTP over a SOCK4 proxy using
the multi interface, which currently doesn't work because of how the data
connection is not waiting for connect before it tries to do proxy magic.
2009-05-11 11:43:55 +00:00
Yang Tse
c5c03ac556 Fixes for non-ASCII platforms by David McCreedy 2009-05-08 02:14:50 +00:00
Yang Tse
5a91746b80 David McCreedy's "TPF-platform specific changes to various files" patch 2009-05-01 12:39:40 +00:00
Daniel Stenberg
6b95c4e358 - I was going to fix issue #59 in KNOWN_BUGS
If the CURLOPT_PORT option is used on an FTP URL like
  "ftp://example.com/file;type=A" the ";type=A" is stripped off.

  I added test case 562 to verify, only to find out that I couldn't repeat
  this bug so I hereby consider it not a bug anymore!
2009-04-30 09:02:39 +00:00
Yang Tse
33a3753c3f libcurl's memory.h renamed to curl_memory.h 2009-04-21 11:46:16 +00:00
Yang Tse
c382c550e7 fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value 2009-04-14 12:53:53 +00:00
Yang Tse
c621546bd6 fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value 2009-04-13 07:18:39 +00:00
Yang Tse
63fad159e8 Skip test #558 and #559 also when using a Win32 DLL 2009-04-09 01:24:41 +00:00
Benoit Neil
e5f1480a38 (Minor update) Added labal prefixes to tests targets 2009-04-08 23:48:07 +00:00
Benoit Neil
25f626cc52 Fixed compile defines in CMake scripts 2009-04-08 11:42:45 +00:00
Daniel Stenberg
c4fba310d2 and include the .inc files in the release tarballs... 2009-04-07 22:07:07 +00:00
Benoit Neil
e9dd099870 Added missing tests in CMake, added Makefile.inc for tests (+ use in CMake scripts), and fixed a missing define under windows in a test source file. 2009-04-07 21:59:15 +00:00
Benoit Neil
b85154f13f Added tests (exes) targets, refactor a few things.
PS: Once again, sorry if the added files have executable perms on Linux.
2009-04-06 21:05:44 +00:00
Dan Fandrich
6bb9ef8de4 Call setlocale() for libtest tests to test the effects of locale-induced
libc changes on libcurl.
2009-01-21 04:30:05 +00:00
Dan Fandrich
b2ed1e2607 Fixed an OOM problem with test 560 2008-11-12 22:26:06 +00:00
Daniel Stenberg
d07d1a6ef8 Added test case 560:
This test was added after the HTTPS-using-multi-interface with OpenSSL
regression of 7.19.1 to hopefully prevent this embarassing mistake from
appearing again... Unfortunately the bug wasn't triggered by this test, which
presumably is because the connect to a local server is too fast/different
compared to the real/distant servers we saw the bug happen with.
2008-11-11 21:59:25 +00:00
Yang Tse
95a849efc2 terminate with appropriate exit code 2008-11-07 12:22:43 +00:00
Yang Tse
02fc7bb5f6 fix OOM handling 2008-10-31 14:46:48 +00:00
Yang Tse
0ce97f77e0 Use our Curl_addrinfo definition even when an addrinfo struct is available.
Use a wrapper function to call system's getaddrinfo().
2008-10-30 13:45:25 +00:00
Yang Tse
b17ca44f0b fix test # 558 and 559 CFLAGS 2008-10-28 00:35:08 +00:00
Yang Tse
92f3b3895e test #558 tests internal hash create/destroy
test #559 tests internal hash create/add/destroy
2008-10-27 20:01:58 +00:00
Yang Tse
310d842b70 Skip test #558 when libcurl is built with hidden symbols 2008-10-27 14:02:50 +00:00
Yang Tse
1498de83d6 For tracing purposes log a fake call to getaddrinfo
when allocating/building the fake Curl_addrinfo.
2008-10-27 08:20:36 +00:00
Yang Tse
39e5fa6ae8 avoid using Curl_ip2addr(), simply build up a fake Curl_addrinfo 2008-10-27 03:00:47 +00:00
Yang Tse
dc289aa4fa convert test #558 into something more interesting, attempting
now to minimally exercise some internal hash routines.
2008-10-26 21:40:20 +00:00
Yang Tse
6db8f53445 test #558 verifies loop operation using malloc() and free() 2008-10-26 03:03:29 +00:00
Dan Fandrich
88513d2d1a Fixed some compiler warnings with gcc 2008-10-01 17:34:24 +00:00
Dan Fandrich
abe61b9926 Fixed test 539 to handle an out of memory condition that shows up now
that memdebug.h is included in the test programs.
2008-09-22 17:20:29 +00:00
Yang Tse
7c9631081d fix compiler warning: external declaration in primary source file 2008-09-21 03:48:25 +00:00
Yang Tse
7beb473a3d include "memdebug.h" 2008-09-20 04:26:55 +00:00
Yang Tse
f7ef60c13f fix compiler warning: external definition with no prior declaration 2008-09-18 19:17:28 +00:00
Yang Tse
8b2bfa4212 fix compiler warning: external definition with no prior declaration 2008-09-18 19:02:40 +00:00
Yang Tse
a6c915aab9 fix compiler warning: external declaration in primary source file 2008-09-18 16:21:09 +00:00
Dan Fandrich
974145f61c Changed the test data file so it passes an XML syntax check 2008-09-15 22:35:09 +00:00
Daniel Stenberg
780f13db30 Stefan Krause's mail to curl-library at 03 Sep 2008 made me add these two
new date strings to get tested too.
2008-09-05 08:15:21 +00:00
Yang Tse
62d94ff342 Fix wrong signed int formatting string directive in test case #557.
This error did not cause test failures on systems where sizeof(int) == sizeof(long).
2008-08-24 17:10:24 +00:00
Yang Tse
95cef39def Test case 557 now also verifies signed and unsigned int formatting. 2008-08-21 05:19:40 +00:00
Yang Tse
1c68e79091 Simplify condition check 2008-08-20 23:29:07 +00:00
Yang Tse
3e0b6a7d1f Update test case 557 2008-08-18 18:52:13 +00:00
Yang Tse
2f71461b29 Added test case 557 to verify libcurl's internal curl_m*printf() functions
formatting functionality when handling signed and unsigned longs, as well as
our curl_off_t data type.
2008-08-18 09:58:08 +00:00
Dan Fandrich
9ee7a014c9 Handle short reads 2008-08-12 18:32:55 +00:00
Yang Tse
14240e9e10 Initial support of curlbuild.h and curlrules.h which allows
to have a curl_off_t data type no longer gated to off_t.
2008-08-07 00:29:08 +00:00
Yang Tse
1e7125ae7b add comment for include paths 2008-07-15 05:46:49 +00:00
Dan Fandrich
336992cc54 Fixed test 553 to pass the torture test. 2008-07-11 18:23:06 +00:00
Yang Tse
d8f109176c fallback to gettimeofday when monotonic clock is unavailable at run-time 2008-07-10 07:16:45 +00:00
Dan Fandrich
60f0b4fffe Fixed test 554 to pass the torture test. 2008-07-08 21:16:18 +00:00
Daniel Stenberg
0e5da5b8bc - Scott Barrett provided a test case for a segfault in the FTP code and the
fix for it. It occured when you did a FTP transfer using
  CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but
  switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being
  cleared properly.  Scott's test case is now known as test 539 and it
  verifies the fix.
2008-07-07 20:37:07 +00:00
Daniel Stenberg
930a45e7a9 - Added CURLINFO_PRIMARY_IP as a new information retrievable with
curl_easy_getinfo. It returns a pointer to a string with the most recently
  used IP address. Modified test case 500 to also verify this feature. The
  implementing of this feature was sponsored by Lenny Rachitsky at NeuStar.
2008-06-06 17:33:35 +00:00
Dan Fandrich
d31da176eb Made sure to pass longs in to curl_easy_setopt where necessary in the
libtest code.
2008-05-22 21:49:52 +00:00
Daniel Stenberg
c1dfe2c529 wait for all 129 bytes 2008-05-13 21:43:37 +00:00
Daniel Stenberg
7f88e8badb Added test case 556 that uses curl_easy_send() and curl_easy_recv() 2008-05-13 21:42:07 +00:00
Yang Tse
ed80eb5b0f configure script will now define HAVE_CLOCK_GETTIME_MONOTONIC symbol only
when function clock_gettime() is available and the monotonic timer is
also available. Otherwise, in some cases, librt or libposix4 could be used
for linking even when finally not using the clock_gettime() function due
to lack of the monotonic clock.
2008-05-12 02:04:21 +00:00
Yang Tse
60dd765b3d fix syntax error: missing semicolon 2008-05-10 23:50:55 +00:00
Yang Tse
19479ea021 Internal time differences now use monotonic time source if available.
This also implies the removal of the winmm.lib dependency for WIN32.
2008-05-09 16:31:51 +00:00
Yang Tse
b8193b6321 tests/libtest/delay.pl no longer used. The 'delay' attribute of the
test harness <command> subsection now provides this functionality.
2008-04-25 11:01:26 +00:00
Yang Tse
d3f46eb61b test 1001 needs a small delay between client part execution and test
result file verifications to allow the test server to completely write
out all files
2008-04-18 17:25:54 +00:00
Yang Tse
72c58b0d1d test 1001 needs a small delay between client part execution and test
result file verifications to allow the test server to completely write
out all files
2008-04-18 17:17:14 +00:00
Yang Tse
6c89e1b311 fix compiler warning: enumerated type mixed with another type 2008-04-17 11:59:46 +00:00
Daniel Stenberg
0331071346 Added test case 555, a variation of 547 but using multi interface instead of
easy. This was reported not working by Penugonda Chenna Reddy in
http://curl.haxx.se/mail/lib-2008-04/0046.html but I fail to repeat that
problem.
2008-04-16 21:11:46 +00:00
Yang Tse
6fd3ff4032 fix compiler warning: argument is incompatible with corresponding format string conversion 2008-04-07 15:40:49 +00:00
Daniel Stenberg
a2314225e0 - Added CURLFORM_STREAM as a supported option to curl_formadd() to allow an
application to provide data for a multipart with the read callback. Note
  that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the
  stream option is used. This feature is verified by the new test case
  554. This feature was sponsored by Xponaut.
2008-03-31 10:02:23 +00:00
Dan Fandrich
7f7b643c0d Made the test work on perl 5.00 2008-03-28 18:19:11 +00:00
Dan Fandrich
942daece00 Spell the commands right 2008-03-15 01:03:23 +00:00
Dan Fandrich
040a4443a1 Added tests 622-625 to test SFTP/SCP uploads. Test 625 was an attempt to
reproduce the --ftp-create-dirs problem reported by Brian Ulm, but that
seems to need a call curl_easy_reset() which this test case doesn't do.
2008-03-13 22:51:39 +00:00
Daniel Stenberg
b12fef3f31 Michal Marek's cleanup of how curl_easy_setopt() is used in examples and
test code. Thanks to his curl_easy_setopt() typechecker work...
2008-02-27 09:06:15 +00:00
Daniel Stenberg
55700cb01f - We no longer support setting the CURLOPT_URL option from inside a callback
such as the CURLOPT_SSL_CTX_FUNCTION one treat that as if it was a Location:
  following. The patch that introduced this feature was done for 7.11.0, but
  this code and functionality has been broken since about 7.15.4 (March 2006)
  with the introduction of non-blocking OpenSSL "connects".

  It was a hack to begin with and since it doesn't work and hasn't worked
  correctly for a long time and nobody has even noticed, I consider it a very
  suitable subject for plain removal. And so it was done.
2008-02-20 08:28:02 +00:00
Daniel Stenberg
11fae450fa make this test disabled properly when built with yassl 2008-02-13 21:36:24 +00:00
Dan Fandrich
ce1649564c Added tests 1022 and 1023 to validate output of curl-config --version and
--vernum
2008-02-08 01:21:03 +00:00
Daniel Stenberg
7b9435890d add verbose output to test 509 for easier debugging 2008-01-29 23:10:25 +00:00
Yang Tse
3caeb0a91f undo using internal *printf() clones for test #530 2008-01-21 05:35:08 +00:00
Yang Tse
a4eddf0d0d use internal *printf() clones since snprintf() not available on all platforms 2008-01-20 22:53:56 +00:00
Daniel Stenberg
daadcfd1de Dmitry Kurochkin fixed test case 530 (pipelining) 2008-01-19 10:14:45 +00:00
Yang Tse
0530b0a5ca Don't abort tests 518 and 537 when unable to raise the open-file soft limit 2008-01-17 18:57:50 +00:00
Daniel Stenberg
c522f349fe Added test 553. This test case and code is based on the bug recipe Joe Malicki
provided for bug report #1871269, fixed on Jan 14 2008 before the 7.18.0
release.
2008-01-16 22:54:54 +00:00
Yang Tse
88d89b2177 Fix 'format string' compiler warning 2008-01-04 15:39:06 +00:00
Daniel Stenberg
f277124a0f In an attempt to repeat the problem in bug report #1850730
(http://curl.haxx.se/bug/view.cgi?id=1850730) I wrote up test case 552. The
test is doing a 70K POST with a read callback and an ioctl callback over a
proxy requiring Digest auth. The test case code is more or less identical to
the test recipe code provided by Spacen Jasset (who submitted the bug report).
2007-12-26 21:48:52 +00:00
Daniel Stenberg
089668ec73 correct the comment about size 2007-12-08 22:53:49 +00:00
Daniel Stenberg
cc0ce38acc add test 549 and 550 2007-12-08 22:53:28 +00:00
Daniel Stenberg
7d3ea12b62 Spacen Jasset reported a problem with doing POST (with data read with a
callback) over a proxy when NTLM is used as auth with the proxy. The bug
also concerned Digest and was limited to using callback only. Spacen worked
with us to provide a useful patch. I added the test case 547 and 548 to
verify two variations of POST over proxy with NTLM.
2007-12-05 21:20:14 +00:00
Daniel Stenberg
59dc9085d1 fix compiler warning 2007-12-05 11:10:24 +00:00
Daniel Stenberg
4e4f33a297 added test548 which uses the lib547 source file, preparing for test547 which
is supposed to repeat the bug report "NTLM proxy authentication with
CURLOPT_READDATA seems broken." posted on the curl-library mailing list on dec
3 2007.
2007-12-05 11:08:56 +00:00
Dan Fandrich
c8355c27e9 Sort the directory listing because the server doesn't always do it. 2007-11-05 20:54:35 +00:00
Dan Fandrich
2f3d520571 Ignore more features that curl-config is not expected to know about 2007-11-01 21:20:24 +00:00
Dan Fandrich
6f33531861 Added test case 1014 to compare curl-config --features with curl --version 2007-11-01 03:09:27 +00:00
Dan Fandrich
16897354bc Added test case 1013 to check that curl-config --protocols matches the
protocols listed in curl --version
2007-11-01 00:36:55 +00:00
Patrick Monnerat
0678a51d3b Allow test server to handle binary POSTs.
Tests 35, 544 545 added: binary data POSTs.
2007-10-25 19:40:05 +00:00
Yang Tse
8e7da9464a Read callback should return 0 when no more data left 2007-10-23 15:10:48 +00:00
Yang Tse
92433e596b We use this ZERO_NULL to avoid picky compiler warnings,
when assigning a NULL pointer to a function pointer var.
2007-10-17 16:58:32 +00:00
Yang Tse
059707be32 Renamed a couple of global variables to avoid shadowing warnings 2007-10-02 16:05:28 +00:00
Daniel Stenberg
ec08e2f9f2 Alex Fishman reported a curl_easy_escape() problem that was made the
function do wrong on all input bytes that are >= 0x80 (decimal 128) due to a
signed / unsigned mistake in the code. I fixed it and added test case 543 to
verify.
2007-09-30 22:40:24 +00:00
Yang Tse
b108c664ac Fix missing right parenthesis 2007-09-30 01:27:39 +00:00
Yang Tse
64db60397b Fix comparison between signed and unsigned 2007-09-30 01:01:43 +00:00
Dan Fandrich
9fc8800b6d Removed cut-and-paste cruft leading to fclose() of an unopened file 2007-09-27 17:22:10 +00:00
Dan Fandrich
16b95fc773 Enabled a few more gcc warnings with --enable-debug. Renamed a few
variables to avoid shadowing global declarations.
2007-09-27 01:45:22 +00:00
Daniel Stenberg
a6315359d7 Max Katsev reported that when doing a libcurl FTP request with
CURLOPT_NOBODY enabled but not CURLOPT_HEADER, libcurl wouldn't do TYPE
before it does SIZE which makes it less useful. I walked over the code and
made it do this properly, and added test case 542 to verify it.
2007-09-26 12:00:01 +00:00
Dan Fandrich
26f8de459a Made the directory postprocessor more forgiving of input directory format 2007-09-17 17:22:46 +00:00
Daniel Stenberg
9e241864e3 Extracting the CURLINFO_PRIVATE pointer makes no point since nothing set
it. This caused a segfault in some fprintf() implementations. Like on Solaris.
2007-09-12 10:46:14 +00:00
Daniel Stenberg
9e88343a17 Daniel S (12 September 2007)
- Bug report #1792649 (http://curl.haxx.se/bug/view.cgi?id=1792649) pointed
  out a problem with doing an empty upload over FTP on a re-used connection.
  I added test case 541 to reproduce it and to verify the fix.

- I noticed while writing test 541 that the FTP code wrongly did a CWD on the
  second transfer as it didn't store and remember the "" path from the
  previous transfer so it would instead CWD to the entry path as stored. This
  worked, but did a superfluous command. Thus, test case 541 now also verifies
  this fix.
2007-09-11 22:23:57 +00:00
Dan Fandrich
652e2cf57c Removed redundant dependency lines 2007-08-13 18:11:37 +00:00
Dan Fandrich
2e60ca382d Fixed some icc compiler warnings. 2007-08-07 00:10:27 +00:00
Dan Fandrich
5ecd56d964 Implemented only the parts of Patrick Monnerat's OS/400 patch that renamed
some few internal identifiers to avoid conflicts, which could be useful on
other platforms.
2007-07-23 18:51:22 +00:00
Dan Fandrich
989dd9c34a Fixed test cases 613 and 614 by improving the log postprocessor to handle
a new directory listing format that newer libssh2's can provide.  This
is probably NOT sufficient to handle all directory listing formats that
server's can provide and should be revisited.
2007-07-17 21:53:38 +00:00
Daniel Stenberg
1da3d402f6 convert test case 540 to use a custom Host: header as well 2007-07-15 21:00:26 +00:00
Daniel Stenberg
1da3192d2d let's just export the whole argc + argv pair globally so that each test tool
can take advantage of it however they see fit!
2007-07-15 20:59:43 +00:00
Daniel Stenberg
15c8219340 Added test case 540 and lib540.c, the 'proxyauth.c' test app posted by Shmulik
Regev on the libcurl mailing list on 10 Jul 2007, converted to a test case.
2007-07-14 22:39:22 +00:00
Daniel Stenberg
5ae21ebde9 add support for arg3 as the third argument... 2007-07-14 22:38:18 +00:00
Dan Fandrich
09fd3b4935 Match file times occurring in the morning. 2007-05-16 17:45:53 +00:00
Dan Fandrich
b0a4c992e7 Added SFTP directory listing test case 613. 2007-05-14 22:03:42 +00:00
Dan Fandrich
6c8e6549d0 Check the return code from curl_multi_add_handle() 2007-05-02 06:02:13 +00:00
Dan Fandrich
5187faeeb9 Improved the test harness to allow running test servers on other than
the default port numbers, allowing more than one test suite to run
simultaneously on the same host.
2007-04-30 20:15:33 +00:00
Dan Fandrich
6a35841b2e Added tests 610-612 to test more SFTP post-quote commands. 2007-04-23 23:00:38 +00:00
Yang Tse
a0a79ce853 unify fopen() failure error message among tests, allowing
the testsuite to count them as errors of the same kind
2007-04-05 11:05:36 +00:00
Yang Tse
5625e5d5b8 add debug message and expand comment 2007-04-04 08:58:36 +00:00
Yang Tse
8a529bd987 test can be allowed to run if fopen() is capable of fopen()ing
three additional files once that we have already open()ed the
big bunch of file descriptors.
2007-04-04 06:39:03 +00:00
Yang Tse
a1f72943e9 cleanup 2007-04-04 05:04:47 +00:00
Yang Tse
ec8019b2a8 test can be allowed to run if fopen() is capable of fopen()ing
SAFETY_MARGIN additional files once that we have already open()ed
the big bunch of file descriptors.
2007-04-04 03:19:59 +00:00
Yang Tse
2886ce96b0 Verify if the test is limited by an ancient stdio with a 256
open file limit.  In this case the test is skipped with a
message showing this limitation when the number of open files
needed for the test is greater than 256.
2007-04-03 18:02:02 +00:00
Yang Tse
7bbad0b534 try not to link with unneeded libs, avoiding global LDADD 2007-04-03 02:57:54 +00:00
Daniel Stenberg
c1f3edbdd1 openssl/bio.h doesn't exist when we build with yassl so avoid trying 2007-03-16 22:44:46 +00:00
Yang Tse
40087ce7c0 change max allowed time for this test to complete to 90 seconds 2007-03-10 00:19:05 +00:00
Yang Tse
53a3abc76b 30 seconds isn't long enough for this test on a loaded server. 2007-03-03 04:27:19 +00:00
Yang Tse
69565afab0 Check for stdbool.h at configuration stage, and include it if available.
Check for lowercase 'bool' type at configuration stage. If not available
provide a suitable replacement with a type definition of 'unsigned char'
in setup_once.h

Move definitions of TRUE and FALSE to setup_once.h
2007-02-22 02:51:54 +00:00
Yang Tse
29bb6f65f1 Move header file inclusion logic and definition of timeval
struct for platforms that don't have it to setup_once.h
2007-02-20 12:12:27 +00:00
Yang Tse
da8c666e4f add tutil_tvdiff_secs() for completeness 2007-02-20 01:09:38 +00:00
Yang Tse
75fca27f8e log a message, stating the need of openssl to run this test 2007-02-19 04:51:47 +00:00
Yang Tse
789fd0b74a Replicate the configure tests that determined that timeval was available. 2007-02-17 11:43:52 +00:00
Yang Tse
4dc453c087 add debug messages for fopen() failures 2007-02-16 19:17:05 +00:00
Yang Tse
4894ce16fc use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling 2007-02-16 16:01:19 +00:00
Yang Tse
8c9233f6b2 Include both testutil.c and testutil.h, and not just testutil.c, in the
list of source files for those tests that use it. Otherwise testutil.h
might not be found by the compiler.
2007-02-09 12:41:57 +00:00
Yang Tse
6fcf98f617 Some tests were using functions curlx_tvnow and curlx_tvdiff which are not
part of the official libcurl API http://curl.haxx.se/lxr/source/lib/README.curlx
The documented way of using them would be to use timeval.c as a source code file.

The above described method works very well when statically linking libcurl and
apps, test programs, but has several drawbacks when you build a true shared
libcurl (i.e. Name space clash at linkage stage as functions are defined more
than once. Windows makefiles are not capable of handling this system of
source-level sharing)

So...

Now testutil.h and testutil.c define and implement tutil_tvnow and tutil_tvdiff
which replace curlx_tvnow and curlx_tvdiff for the libtest programs. Doing this
we avoid the above described problems, and the code in the testsuite does not
impose the need to keep those functions public in libcurl even when not part of
the API.
2007-02-09 01:17:24 +00:00
Yang Tse
2f4fe0175b Some tests were using functions curlx_tvnow and curlx_tvdiff which are not
part of the official libcurl API http://curl.haxx.se/lxr/source/lib/README.curlx
The documented way of using them would be to use timeval.c as a source code file.

The above described method works very well when statically linking libcurl and
apps, test programs, but has several drawbacks when you build a true shared
libcurl (i.e. Name space clash at linkage stage as functions are defined more
than once. Windows makefiles are not capable of handling this system of
source-level sharing)

So...

Now testutil.h and testutil.c define and implement tutil_tvnow and tutil_tvdiff
which replace curlx_tvnow and curlx_tvdiff for the libtest programs. Doing this
we avoid the above described problems, and the code in the testsuite does not
impose the need to keep those functions public in libcurl even when not part of
the API.
2007-02-09 01:11:14 +00:00
Gisle Vanem
a7748c2024 Constify argument to suburl(). Remove trailing space. 2007-02-04 12:12:02 +00:00
Yang Tse
c2639e0738 when using select() instead of poll, skip the test if the number of
open file descriptors is greater than FD_SETSIZE minus SAFETY_MARGIN,
also skip the test if any of the open file descriptors has a number
greater than FD_SETSIZE minus SAFETY_MARGIN.
2007-01-31 15:34:53 +00:00
Yang Tse
d7d5baa0e2 fix temp string buffer variable name 2007-01-30 13:21:39 +00:00
Yang Tse
bad67830b3 skip test on platforms on which we use select() instead
of poll() and select() happens to be bound by FD_SETSIZE
2007-01-30 03:48:29 +00:00
Daniel Stenberg
a4b39c6ab8 the same source file is re-used for multiple tests and I missed to add the
timval.c dependency on some of those
2007-01-29 20:37:02 +00:00
Gisle Vanem
d10e174fd1 Some compilers lacks <sys/time.h>. Include "timeval.h" to simplify the #ifdefs. 2007-01-29 20:24:00 +00:00
Daniel Stenberg
4d8dcf7b77 the libtest source codes that use curlx_tv* functions MUST use the
lib/timeval.c source code since those functions are not in the API (and might
not be accessible)
2007-01-29 10:09:06 +00:00
Yang Tse
e09450103b Compiler warning fix 2007-01-28 03:51:10 +00:00
Dan Fandrich
3bae748256 Added precheck that curl supports the 'openssl' engine in test 307. 2007-01-18 18:04:20 +00:00
Yang Tse
318a7584f3 add a couple more of debugging messages 2006-11-03 14:13:25 +00:00
Yang Tse
78081a1652 reduce max size of dinamically allocated arrays to minimize the nasty
behaviour some versions of IRIX exhibit of committing suicide on big
mallocs instead of just returning a friendly null pointer
2006-11-03 10:05:21 +00:00
Yang Tse
1dee2cd55e fix comments and renumber rlimit return codes
fix closing of fd's when limit is reached
2006-11-03 01:57:25 +00:00
Yang Tse
426ecfd136 fix comments and renumber rlimit return codes 2006-11-03 01:56:55 +00:00
Yang Tse
7f1870da5f remove leftover comment 2006-11-02 20:56:40 +00:00
Yang Tse
2149a095f7 update and split test cases 518 and 537 into its own source code file 2006-11-02 20:50:18 +00:00
Yang Tse
e8d21adbaa code cleanup 2006-11-02 15:47:24 +00:00
Yang Tse
fa28531322 use our internal string functions and replace sprintf with snprintf 2006-11-02 03:45:07 +00:00
Yang Tse
4f4427ff41 check symbol HAVE_UNISTD_H instead of UNISTD_H to include unistd.h 2006-11-02 00:34:21 +00:00
Yang Tse
905ca77c9e test 518 is all about testing libcurl functionality
when more than FD_SETSIZE file descriptors are open.
This means that if for any reason we are not able to
open more than FD_SETSIZE file descriptors then test
518 should not be run.

test 537 is all about testing libcurl functionality
when the system has nearly exhausted the number of
free file descriptors. Test 537 will try to run with
very few free file descriptors.
2006-11-01 18:33:50 +00:00
Yang Tse
9b2acca63e Sync comment with code and add three messages more 2006-10-31 01:24:03 +00:00
Yang Tse
afcd9f1b1c Address some pitfalls in the rlimit() function check that were
preventing execution of this test on many platforms
2006-10-30 17:24:31 +00:00
Yang Tse
609044aea2 Compiler warning fix 2006-10-29 21:19:23 +00:00
Yang Tse
32ad212ac9 30 seconds isn't long enough for this test on a loaded server. 2006-10-27 01:58:59 +00:00
Gisle Vanem
125830ab4b Use proper 'stat' structure for fstat(). I.e. 'struct _stati64' and '_fstati64()'
on Win32.
2006-10-26 14:30:11 +00:00
Yang Tse
5b75b423e6 Improved rlimit logic:
- Take in account RLIM_INFINITY.
- Verify that soft limit is actually changed when doing so.
- Show errno in case getrlimit or setrlimit fails.
- Keep file descriptors open only while runing this test.
2006-10-26 13:55:24 +00:00
Yang Tse
cd3029f36f 30 seconds isn't long enough for this test on a loaded server. 2006-10-26 09:50:21 +00:00
Yang Tse
b4700f026b Add project notice and file Id 2006-10-25 09:20:44 +00:00
Yang Tse
d771fa7c48 Compiler warning fix 2006-10-25 08:52:00 +00:00
Yang Tse
384c8f3560 Use curl_global_init() and curl_global_cleanup().
Improve cleanup in case of initialization failure.
2006-10-25 05:59:46 +00:00
Yang Tse
c54a4301ee Abort test if it seems that it would have run forever. This is just to prevent
test hanging and actually is an indication that there's a condition that is
not being properly handled at some point in the library.

Remove a pair of braces and adjust indentation appropriately.
2006-10-24 15:51:42 +00:00
Dan Fandrich
9b8b1a68f0 30 seconds isn't long enough for this test on a loaded server. 2006-10-23 19:15:14 +00:00
Daniel Stenberg
90933ac660 rely on the global LDADD instead of having specific ones for every program 2006-10-21 13:00:51 +00:00
Daniel Stenberg
deb81b2ad4 Nir Soffer made the tests/libtest/Makefile.am use a proper variable for all
the single test applications' link and dependences, so that you easier can
override those from the command line when using make.
2006-10-21 11:40:04 +00:00
Yang Tse
33acd6f041 Compiler warning fix 2006-10-21 10:54:41 +00:00
Yang Tse
d997ff6aa8 Oops! Actually set the limit to 30 seconds. 2006-10-20 15:45:12 +00:00
Yang Tse
b9ccecf86e Decrease the posibility of aborting a test which actually is not
stale by replacing loop counters with timeouts. In this way the
main loop of the test will be allowed to run up to 30 seconds on
any platform before aborting it.
2006-10-20 15:39:54 +00:00
Yang Tse
19e07771d1 Set loop2 counter limit to 60 on this test to avoid a false positive. 2006-10-19 23:35:52 +00:00
Yang Tse
ef267ab449 Replace tabs with spaces and Compiler warning fix. 2006-10-19 22:49:33 +00:00
Yang Tse
4f6ed683e8 Compiler warning fix 2006-10-19 22:48:33 +00:00
Yang Tse
c818e7064f When aborting, show loop counter values when more than one counter exists. 2006-10-19 21:12:27 +00:00
Yang Tse
ead6ab2ef7 Abort test if it seems that it would have run forever. This is just to prevent
test hanging and actually is an indication that there's a condition that is
not being properly handled at some point in the library.

Loop counter limits might need to be further increased on false positives.
2006-10-19 17:29:25 +00:00
Yang Tse
5df4be1165 Check for USE_WINSOCK instead of WIN32 where the check was done
to verify winsock API availability.
2006-10-18 21:05:40 +00:00
Yang Tse
e150150d9f Remove redundant __CYGWIN__ symbol check 2006-10-11 16:01:16 +00:00
Yang Tse
943f0733bb Compiler warning fix 2006-10-10 23:58:02 +00:00
Yang Tse
8274447dd9 Call curl_global_cleanup() in all code paths before exiting test 2006-10-10 23:50:37 +00:00
Daniel Stenberg
cbcdd337aa Added test case 536 in an attempt to add Bogdan Nicula's problematic case
with multi interface and pipelining. This test just works and did not repeat
the problem his test code showed, but could still serve as a useful test.
2006-10-09 21:29:53 +00:00
Daniel Stenberg
c144adf77c used for test 535 too 2006-10-09 21:26:09 +00:00
Yang Tse
15e3dfe1d3 Compiler warning fix 2006-10-09 11:21:40 +00:00
Daniel Stenberg
a1de9367ec Bogdan Nicula's second test case (posted Sun, 08 Oct 2006) converted to test
case 535 and it now runs fine. Again a problem with the pipelining code not
taking all possible (error) conditions into account.
2006-10-09 06:58:05 +00:00
Daniel Stenberg
2ad7fcbc2f test 534 added in an attempt to repeat Bogdan Nicula's bug... 2006-10-08 10:51:53 +00:00
Daniel Stenberg
2c62dfd124 modified lib533 to accept both URLs on the command line 2006-10-08 08:50:12 +00:00
Daniel Stenberg
befc30bc55 Bogdan Nicula's hanging test case was converted to test case 533 and the test
now runs fine.
2006-10-06 21:19:57 +00:00
Daniel Stenberg
552b963e6d Dmitriy Sergeyev provided an example source code that crashed CVS libcurl
but that worked nicely in 7.15.5. I converted it into test case 532 and
fixed the problem.
2006-10-04 21:11:08 +00:00
Daniel Stenberg
ae13c93b7d Reported in #1561470 (http://curl.haxx.se/bug/view.cgi?id=1561470), libcurl
would crash if a bad function sequence was used when shutting down after
using the multi interface (i.e using easy_cleanup after multi_cleanup) so
precautions have been added to make sure it doesn't any more - test case 529
was added to verify.
2006-09-28 21:26:06 +00:00
Yang Tse
5a6c89661a Cygwin preprocessor adjustments 2006-09-12 01:17:16 +00:00