Commit Graph

100 Commits

Author SHA1 Message Date
Yang Tse a840cc700a Revert change committed on Mon May 4 09:30:23 2009 UTC.
The origin of the problem with test case #251 was the --ftp-port not being the CLIENTIP address.
2009-05-05 08:46:31 +00:00
Yang Tse ff3e574187 David McCreedy's patch to fix test suite harness to allow test FTP server and client on different machines, providing FTP client address when running the FTP test server. 2009-05-04 10:30:23 +00:00
Daniel Stenberg 18371aaff9 - Fred Machado posted about a weird FTP problem on the curl-users list and when
researching it, it turned out he got a 550 response back from a SIZE command
  and then I fell over the text in RFC3659 that says:

   The presence of the 550 error response to a SIZE command MUST NOT be taken
   by the client as an indication that the file cannot be transferred in the
   current MODE and TYPE.

  In other words: the change I did on September 30th 2008 and that has been
  included in the last two releases were a regression and a bad idea. We MUST
  NOT take a 550 response from SIZE as a hint that the file doesn't exist.
2008-12-08 20:20:51 +00:00
Dan Fandrich 4d50b9f1f1 Make the SLOWDOWN option slow the FTP data connection, not just the
control connection.
2008-11-06 00:10:58 +00:00
Daniel Stenberg 038542ea3e - The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZE
gets a 550 response back for the cases where a download (or NOBODY) is
  wanted. It still allows a 550 as response if the SIZE is used as part of an
  upload process (like if resuming an upload is requested and the file isn't
  there before the upload). I also modified the FTP test server and a few test
  cases accordingly to match this modified behavior.
2008-09-30 09:51:58 +00:00
Dan Fandrich 13afcbd1eb Avoid a potential zombie process when killing an old ftpserver 2008-07-11 17:18:37 +00:00
Yang Tse 96edebf4d9 improve synchronization between test harness runtests.pl script
and test harness servers to minimize risk of false test failures.

http://curl.haxx.se/mail/lib-2008-04/0392.html
2008-04-23 23:55:34 +00:00
Yang Tse 3daa54d636 Revert last change since it breaks running the test suite
when builddir is different from srcdir.
2007-11-23 09:50:44 +00:00
Yang Tse 8f1829d1d2 Improve chance of running runtests.pl from outside the
source tree 'tests' directory
2007-11-23 04:03:46 +00:00
Dan Fandrich 59dccb34b0 Made the magic testnumber > 10000 support actually work 2007-10-27 01:02:57 +00:00
Dan Fandrich 4f00a02ba3 Fixed the test FTP server to support the >10000 test number notation 2007-10-24 19:39:29 +00:00
Dan Fandrich 4686adb433 Added variable substitution to the <verify><file> section.
Made a few more tests work remotely.
2007-09-20 20:39:17 +00:00
Dan Fandrich 0ed57d370d Allow setting the IP address on which to listen for connections. 2007-09-17 21:39:34 +00:00
Dan Fandrich 9b11a84e74 Make the ftp server connect to the address given by curl in the PORT/EPRT
instead of hard-coding it to 127.0.0.1
2007-09-17 18:12:11 +00:00
Dan Fandrich 9537580ba2 Allow ftp server alternate replies to contain backslash-escaped control
characters.
2007-08-23 23:24:39 +00:00
Dan Fandrich 7ffae92daf Need even more time to wait for an accept. 2007-08-23 18:45:28 +00:00
Dan Fandrich 1a8d8aa227 Increase timeout for accept for improved reliability on loaded servers. 2007-08-20 17:53:38 +00:00
Dan Fandrich cc44fb1dc8 Log the "<CMD> wasn't handled" error normally since it is now expected
to occur in a couple of tests.
2007-07-23 17:51:43 +00:00
Daniel Stenberg 84e7bb85b1 To allow more flexibility in FTP test cases, I've removed the enforced states
from the test server code as they served no real purpose. The test server is
here to serve for the test cases, not to attempt to function as a real server!
2007-07-21 21:48:58 +00:00
Dan Fandrich 17507eac85 Clear out FTP server options before each new client.
Wait for child processes to die to avoid creating zombies.
2007-04-24 21:30:39 +00:00
Dan Fandrich 043070f90e Changed an error message slightly so it can be caught easier by the
autobuild logs scanner.
2007-04-20 17:16:32 +00:00
Yang Tse cef5b14baa Reduce the posibility of leaving the sockfilter hanging around when
tearing down the test ftp server due to a read error condition.
2007-03-01 16:42:02 +00:00
Yang Tse 268fe09322 Revert ftpserver.pl back to revision 1.74 Adding change done in 1.76
This is done to back out changes done in revisions 1.77 and 1.75
2006-11-20 16:58:41 +00:00
Yang Tse 1e35d95df8 Add some message logging 2006-11-20 10:35:25 +00:00
Daniel Stenberg 7f2d5cab2d log the sleep, like when done in test 190 2006-11-19 22:48:40 +00:00
Yang Tse 74ddbd8a3b The hash of running servers is now a hash of hashes which for each running
server holds not only its two main pids, but also the pidfile of the test
server and the 'slavepidfiles' for ftp* servers. This allows a better control
when stopping servers.

Now from runtests.pl when test servers are stopped they are signalled in
sequence TERM, INT and KILL allowing time in between for them to die. This
will give us a chance of gracefully stopping test servers, which we didn't
have when we were killing them in first instance.
2006-11-17 16:44:22 +00:00
Daniel Stenberg ef66497a0d Fix a "sockfilt" leak. When a new 'data' connection sockfilt server is started,
make sure that a previously used one is killed first (since they re-use the
same .pid file etc)
2006-10-08 08:43:32 +00:00
Daniel Stenberg f1d707705e allow user in passwd state for test 280 to work (--ftp-alternative-to-user) 2006-09-24 10:30:02 +00:00
Dan Fandrich cd6c58216a Use /usr/bin/env to invoke perl like the other test scripts. 2006-08-23 21:20:00 +00:00
Daniel Stenberg 7e845e7cfd Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip 2005-09-04 05:16:06 +00:00
Daniel Stenberg 72e532cb67 no more time/re-start of sockfilt, no more redirect of stdin/stdout when
talking to sockfilt
2005-05-25 12:27:19 +00:00
Daniel Stenberg 3aced17c75 don't restart sockfilt after only 5 seconds of inactivity 2005-05-24 21:09:49 +00:00
Daniel Stenberg cea117b509 removed lots of (now) redundant logging 2005-05-04 21:57:07 +00:00
Daniel Stenberg 6078c938b2 modify a value we are allowed to 2005-05-04 21:51:09 +00:00
Daniel Stenberg 9e95dd4821 improved logging (all FTP protocol data, both ways) to possibly help us realize
why sometimes the control connection dies after a RETR has been sent
2005-05-04 21:49:30 +00:00
Daniel Stenberg a0fe950b75 add more info to the log to ease debugging 2005-05-03 23:13:24 +00:00
Daniel Stenberg ed9e10f2d8 another <case> converted to sysread 2005-05-02 11:55:17 +00:00
Daniel Stenberg 02ae3c2810 read from the open2 filehandle with sysread, not <handle> 2005-05-02 11:31:15 +00:00
Daniel Stenberg 669ebb5f71 Fixed the FTP server read stuff when waiting for a connect after a PASV/EPSV.
Made the ftp server use the passed in pidfile name, and made runtests.pl
pass it in properly.
2005-05-02 10:22:09 +00:00
Daniel Stenberg 9a3e0e52cb fix the server for the slow response case 2005-05-02 10:03:12 +00:00
Daniel Stenberg d3eea61f1f Make sure there's no pidfile if we cannot start the initial sockfilt tool -
this happens for some ipv6-enabled hosts on which sockfilt cannot listen
on ipv6.
2005-05-02 09:08:02 +00:00
Daniel Stenberg 85f9e6c4b9 basic signal handler for sigint and sigkill 2005-04-28 21:06:17 +00:00
Daniel Stenberg 8cf1786296 kill slave processes when they fail 2005-04-28 07:36:55 +00:00
Daniel Stenberg 9b391e531b allow some more time 2005-04-18 08:49:21 +00:00
Daniel Stenberg 14424f7058 Modified the FTP server to use the new 'sockfilt' program to do all the socket
level stuff. The FTP server communicates with sockfilt using perl's open2().
This enables easier IPv6 support and hopefully FTP-SSL support in the future.
Added four test cases for FTP-ipv6.
2005-04-18 06:57:44 +00:00
Daniel Stenberg cd1144dc24 make the ftp server support reply/servercmd, and make SLOWDOWN work, and
update the docs accordingly
2005-04-14 22:52:08 +00:00
Daniel Stenberg f6b1173437 copyright this year 2005-03-31 14:42:28 +00:00
Daniel Stenberg 677a74fa1b Made the server send data to the control/data connections using two dedicated
functions. This enabled me to add a function that automatically delays between
each byte, to proper test curl's ability to read FTP server responses sent in
many (small) chunks. See also upcoming libcurl fixes...
2005-03-29 09:09:58 +00:00
Daniel Stenberg 2415724d5f Make the server ignore the given PORT address, to make it possible to test
curl's -P option easier.
2005-01-26 23:18:31 +00:00
Daniel Stenberg f2e71edcbd A minor "syntax error" in numerous test files corrected 2005-01-25 21:45:03 +00:00