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.
This commit is contained in:
parent
4422f80ae7
commit
ff3e574187
4
CHANGES
4
CHANGES
@ -14,6 +14,10 @@ Yang Tse (4 May 2009)
|
||||
the protocol portions are mangled from CRLF to CRCRLF if data->set.crlf or
|
||||
data->set.prefer_ascii are set (depending on CURL_DO_LINEEND_CONV).
|
||||
|
||||
- Applied 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.
|
||||
|
||||
Daniel Fandrich (3 May 2009)
|
||||
- Added and disabled test case 563 which shows KNOWN_BUGS #59. The bug
|
||||
report failed to mention that a proxy must be used to reproduce it.
|
||||
|
@ -9,9 +9,6 @@ To be addressed in 7.19.5 (planned release: May 2009)
|
||||
|
||||
228 - rpath problems in linking with custom openssl
|
||||
|
||||
233 - [PATCH] Allow Curl test suite test #251 to work if client and server
|
||||
are on different machines
|
||||
|
||||
234 - [PATCH] Allow various Curl test suite tests to work on non-ASCII
|
||||
platforms
|
||||
|
||||
|
@ -83,6 +83,7 @@ my $ext; # append to log/pid file names
|
||||
my $grok_eprt;
|
||||
my $port = 8921; # just a default
|
||||
my $listenaddr = "127.0.0.1"; # just a default
|
||||
my $client;
|
||||
my $pidfile = ".ftpd.pid"; # a default, use --pidfile
|
||||
|
||||
my $SERVERLOGS_LOCK="log/serverlogs.lock"; # server logs advisor read lock
|
||||
@ -114,7 +115,12 @@ do {
|
||||
}
|
||||
elsif($ARGV[0] eq "--addr") {
|
||||
$listenaddr = $ARGV[1];
|
||||
$listenaddr =~ s/^\[(.*)\]$/\1/;
|
||||
$listenaddr =~ s/^\[(.*)\]$/\1/;
|
||||
shift @ARGV;
|
||||
}
|
||||
elsif($ARGV[0] eq "--client") {
|
||||
$client = $ARGV[1];
|
||||
$client =~ s/^\[(.*)\]$/\1/;
|
||||
shift @ARGV;
|
||||
}
|
||||
} while(shift @ARGV);
|
||||
@ -705,7 +711,7 @@ sub PORT_command {
|
||||
|
||||
# We fire up a new sockfilt to do the data transfer for us.
|
||||
# FIX: make it use IPv6 if need be
|
||||
my $filtcmd="./server/sockfilt --connect $port --addr $addr --logfile log/sockdata$ftpdnum$ext.log --pidfile .sockdata$ftpdnum$ext.pid $ipv6";
|
||||
my $filtcmd="./server/sockfilt --connect $port --addr $client --logfile log/sockdata$ftpdnum$ext.log --pidfile .sockdata$ftpdnum$ext.pid $ipv6";
|
||||
$slavepid = open2(\*DREAD, \*DWRITE, $filtcmd);
|
||||
|
||||
print STDERR "$filtcmd\n" if($verbose);
|
||||
|
@ -943,6 +943,8 @@ sub runftpserver {
|
||||
my $ip=$HOSTIP;
|
||||
my $nameext;
|
||||
my $cmd;
|
||||
my $addr;
|
||||
my $addr_client;
|
||||
|
||||
if($ipv6) {
|
||||
# if IPv6, use a different setup
|
||||
@ -966,18 +968,20 @@ sub runftpserver {
|
||||
# start our server:
|
||||
my $flag=$debugprotocol?"-v ":"";
|
||||
$flag .= "-s \"$srcdir\" ";
|
||||
my $addr;
|
||||
if($id) {
|
||||
$flag .="--id $id ";
|
||||
}
|
||||
if($ipv6) {
|
||||
$flag .="--ipv6 ";
|
||||
$addr = $HOST6IP;
|
||||
$addr_client = $CLIENT6IP;
|
||||
} else {
|
||||
$addr = $HOSTIP;
|
||||
$addr_client = $CLIENTIP;
|
||||
}
|
||||
|
||||
$cmd="$perl $srcdir/ftpserver.pl --pidfile $pidfile $flag --port $port --addr \"$addr\"";
|
||||
$cmd="$perl $srcdir/ftpserver.pl --pidfile $pidfile $flag --port $port --addr \"$addr\" --client \"$addr_client\"";
|
||||
|
||||
my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
|
||||
|
||||
if($ftppid <= 0 || !kill(0, $ftppid)) {
|
||||
|
Loading…
Reference in New Issue
Block a user