1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-13 21:15:08 -05:00
Commit Graph

136 Commits

Author SHA1 Message Date
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
Daniel Stenberg
b264a03f89 Support file names passed to RETR that don't start with a number. In that
case, all non-numeric prefixing letters are cut off to figure out the test
number.
2005-01-20 22:47:31 +00:00
Daniel Stenberg
b5065e462b add support for NOOP 2005-01-20 22:05:44 +00:00
Daniel Stenberg
3851c6aae2 support the new --id command line option, that allows a second (or third or
whatever) instance to run without overwriting the previous' logfiles
2005-01-17 19:49:12 +00:00
Daniel Stenberg
e9b3e1d031 log client disconnects 2004-10-27 14:18:57 +00:00
Daniel Stenberg
464be27479 Provide support for "transferring" zero bytes FTP files and comparing that
the output file actually is zero bytes after the transfer.
2004-08-23 14:40:43 +00:00
Daniel Stenberg
b92e2ab6b1 new daring features, not used by any current test 2004-06-17 08:06:03 +00:00
Daniel Stenberg
0a83fa90bb skip the pid from the logging 2004-06-15 10:28:56 +00:00
Daniel Stenberg
e11710714c When waiting for the second connect, we now use alarm to timeout the waiting.
This is necessary in case the client never connects or somehow fails to do
it timely. The timeout used now is only 2 seconds, which might cause problems
on really slow hosts but longer times are painful when doing torture testing
on FTP test cases.

I'm not sure how this 'alarm' functionality works on Windows or other systems
that don't actually have the alarm() function.
2004-05-17 08:02:23 +00:00
Daniel Stenberg
6f8b4395ec changed the logging to work when the logfile is removed during testing 2004-04-19 15:20:30 +00:00
Daniel Stenberg
43f8a1f5de change the log format to look similar to sws
added various logging info
2004-04-15 13:55:37 +00:00
Daniel Stenberg
78f52c05a9 Report the correct size when 'verifiedserver' is requested. 2004-03-01 07:16:45 +00:00
Daniel Stenberg
38b6016dfa added the ever-present source header 2004-02-26 11:46:17 +00:00
Daniel Stenberg
4427d91479 runtests.pl now provides the srcdir to the ftpserver so that it can pass
that to loadtest properly.
2004-02-26 09:19:59 +00:00
Daniel Stenberg
80ef1bad86 removed unused stuff 2004-01-16 06:50:41 +00:00
Daniel Stenberg
6e3adc9b14 Support COUNT in the control file, to set the number of times the custom
REPLY is to be sent back before getting blanked and reverted to the built-in
action. Now, we can make CWD fail once and then succeed when retried.
2003-08-08 10:21:47 +00:00
Daniel Stenberg
072070a22c oops, committed test code not meant to be here 2003-04-09 12:02:06 +00:00
Daniel Stenberg
5b13106f54 MDTM support added 2003-04-09 11:52:24 +00:00
Daniel Stenberg
021d406f0c Modified how we log data to server.input, as we can't keep the file open
very much as it makes it troublesome on certain operating systems.
2003-04-03 13:42:06 +00:00
Daniel Stenberg
92872a2a3c log when we've returned verification that we are the test server 2003-04-01 08:42:14 +00:00
Daniel Stenberg
47970b9e6f Added support for the RNFR/RNTO commands 2003-04-01 07:10:08 +00:00
Daniel Stenberg
0251563c98 report pid back in the WE ROOLZ message 2003-03-15 16:39:15 +00:00
Daniel Stenberg
de96719a45 support <size>-1</size> to completely disable the SIZE command 2003-02-26 17:05:36 +00:00
Daniel Stenberg
9876ed09fe added support for RETRNOSIZE in the control file to tell RETR to not
include size in the 150-reply
2003-02-26 16:57:00 +00:00
Daniel Stenberg
637bce2707 bail out on crap received, makes test case 402 *NOT* ruin the test series
anymore!
2002-12-12 18:07:10 +00:00
Daniel Stenberg
064697fde6 very minor log change 2002-04-04 12:23:54 +00:00
Daniel Stenberg
265bb99382 test case 126 added, this uses RETRWEIRDO that makes the FTP server send two
responses at once, to excerise the part of curl to make sure it can cache
(parts of) responses properly.
2001-12-03 13:46:56 +00:00
Daniel Stenberg
10fdb1d743 EPSV and SIZE adjustments 2001-11-28 13:07:49 +00:00
Daniel Stenberg
3bfa06c9a2 improved functionality for new timeout tests 2001-11-02 23:09:25 +00:00
Daniel Stenberg
708431e2ea fixed the REST again 2001-09-14 12:01:21 +00:00
Daniel Stenberg
600d7b11e6 moved lots of the verbose stuff to do logmsg instead 2001-09-13 12:52:24 +00:00
Daniel Stenberg
54e7246342 cleaned up, now closes the listener port in PASV and it doesn't re-use the
same passive port number
2001-09-11 07:45:12 +00:00
Daniel Stenberg
e450888b15 supports SIZE now 2001-06-12 08:38:11 +00:00
Daniel Stenberg
d3516810a7 adjusted to the new test case formats 2001-05-23 15:02:58 +00:00
Daniel Stenberg
4677f733b2 pid files fixes, ftp server already-running-but-no-control check 2001-05-14 12:09:47 +00:00
Daniel Stenberg
4ddb3fbbf4 new tests, new server invoke system 2001-04-24 21:09:53 +00:00
Daniel Stenberg
4646a1ffa9 talks more on verbose 2001-03-05 14:03:20 +00:00
Daniel Stenberg
6429c378a2 the custom reply engine was not inited properly 2001-01-22 16:16:18 +00:00
Daniel Stenberg
989ff585b1 allows simple custom modifications for single test cases 2000-11-27 12:53:32 +00:00
Daniel Stenberg
55b7c1c364 REST support seems to work
NLST sends an NLST-looking list
renamed the upload file
2000-11-21 19:25:14 +00:00
Daniel Stenberg
ae58d84429 Added support for verifiedserver that returns a static silly string that
allows the test script to verify that it is our test server running on the
particular port
2000-11-21 15:49:34 +00:00
Daniel Stenberg
70778f2cb6 NLST does a LIST (a normal unix ftp client 'ls' becomes NLST)
multiple transfers are supported
2000-11-21 13:36:55 +00:00
Daniel Stenberg
bdb411c6ca STOR works! 2000-11-21 13:22:32 +00:00
Daniel Stenberg
44137c7932 fancier login text
removed lots of wasted comments
cleaned up a little
STOR doesn't work
2000-11-21 12:54:08 +00:00
Daniel Stenberg
19a754dc8c removed the forks, we don't need forking for single-task testing 2000-11-21 12:00:24 +00:00
Daniel Stenberg
f22c690b1f flushes the log handles before fork, now the logs work too! 2000-11-20 16:02:53 +00:00
Daniel Stenberg
05ec503eac QUIT works, and now I can run a unix ftp client against the server and it
runs pretty good
2000-11-20 14:26:09 +00:00
Daniel Stenberg
4b8fd86f04 CWD runs 2000-11-20 13:47:25 +00:00
Daniel Stenberg
16cf5ee1c9 RETR seems to work too 2000-11-20 13:19:22 +00:00
Daniel Stenberg
a7937ed49c this is now a working ftp server, both PASV and PORT run fine, LIST works,
RETR and STORE don't
2000-11-20 13:07:04 +00:00
Daniel Stenberg
b2ad1f68cc this is the first attempt of a tiny and simple ftp server in perl for curl
test purposes
2000-11-20 08:00:33 +00:00