Updated the test harness to check for protocol support before running each
test, fixing KNOWN_BUGS #11. Fixed some tests to more accurately specify their required servers and features.
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Dan F (9 March 2007)
|
||||||
|
- Updated the test harness to check for protocol support before running each
|
||||||
|
test, fixing KNOWN_BUGS #11.
|
||||||
|
|
||||||
Dan F (7 March 2007)
|
Dan F (7 March 2007)
|
||||||
- Reintroduced (after a 3 year hiatus) an FTPS test case (400) into the test
|
- Reintroduced (after a 3 year hiatus) an FTPS test case (400) into the test
|
||||||
harness. It is very limited as it supports only ftps:// URLs with
|
harness. It is very limited as it supports only ftps:// URLs with
|
||||||
|
|||||||
@@ -106,9 +106,6 @@ may have been fixed since this was written!
|
|||||||
acknowledged after the actual TCP connect (during the SOCKS "negotiate"
|
acknowledged after the actual TCP connect (during the SOCKS "negotiate"
|
||||||
phase).
|
phase).
|
||||||
|
|
||||||
11. Using configure --disable-[protocol] may cause 'make test' to fail for
|
|
||||||
tests using the disabled protocol(s).
|
|
||||||
|
|
||||||
10. To get HTTP Negotiate authentication to work fine, you need to provide a
|
10. To get HTTP Negotiate authentication to work fine, you need to provide a
|
||||||
(fake) user name (this concerns both curl and the lib) because the code
|
(fake) user name (this concerns both curl and the lib) because the code
|
||||||
wrongly only considers authentication if there's a user name provided.
|
wrongly only considers authentication if there's a user name provided.
|
||||||
|
|||||||
@@ -117,7 +117,17 @@ pipe: [num] - tell the server to expect this many HTTP requests before
|
|||||||
|
|
||||||
<server>
|
<server>
|
||||||
What server(s) this test case requires/uses:
|
What server(s) this test case requires/uses:
|
||||||
'http' 'ftp', 'https', 'ftps', 'http-ipv6'. Give only one per line.
|
|
||||||
|
file
|
||||||
|
ftp
|
||||||
|
ftp-ipv6
|
||||||
|
ftps
|
||||||
|
http
|
||||||
|
http-ipv6
|
||||||
|
https
|
||||||
|
none
|
||||||
|
|
||||||
|
Give only one per line. This subsection is mandatory.
|
||||||
</server>
|
</server>
|
||||||
|
|
||||||
<features>
|
<features>
|
||||||
@@ -134,6 +144,10 @@ libz
|
|||||||
netrc_debug
|
netrc_debug
|
||||||
OpenSSL
|
OpenSSL
|
||||||
SSL
|
SSL
|
||||||
|
|
||||||
|
as well as each protocol that curl supports. A protocol only needs to be
|
||||||
|
specified if it is different from the server (useful when the server
|
||||||
|
is 'none').
|
||||||
</features>
|
</features>
|
||||||
|
|
||||||
<killserver>
|
<killserver>
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ FAILURE
|
|||||||
<server>
|
<server>
|
||||||
none
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
attempt connect to non-listening socket
|
attempt connect to non-listening socket
|
||||||
</name>
|
</name>
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ FAILURE
|
|||||||
<server>
|
<server>
|
||||||
none
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
attempt connect to non-existing host name
|
attempt connect to non-existing host name
|
||||||
</name>
|
</name>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ moo
|
|||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
<server>
|
<server>
|
||||||
none
|
file
|
||||||
</server>
|
</server>
|
||||||
<name>
|
<name>
|
||||||
basic file:// file
|
basic file:// file
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
<server>
|
<server>
|
||||||
none
|
file
|
||||||
</server>
|
</server>
|
||||||
<name>
|
<name>
|
||||||
missing file:// file
|
missing file:// file
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
<server>
|
<server>
|
||||||
none
|
file
|
||||||
</server>
|
</server>
|
||||||
<name>
|
<name>
|
||||||
two file:// URLs to stdout
|
two file:// URLs to stdout
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ moo
|
|||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
<server>
|
<server>
|
||||||
none
|
file
|
||||||
</server>
|
</server>
|
||||||
<name>
|
<name>
|
||||||
file:/path URL with a single slash
|
file:/path URL with a single slash
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
<server>
|
<server>
|
||||||
none
|
file
|
||||||
</server>
|
</server>
|
||||||
<name>
|
<name>
|
||||||
"upload" with file://
|
"upload" with file://
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
<server>
|
<server>
|
||||||
none
|
file
|
||||||
</server>
|
</server>
|
||||||
<name>
|
<name>
|
||||||
"upload" with file://
|
"upload" with file://
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ blablabla
|
|||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
ftp
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
HTTP PUT a to a FTP URL with username+password - over HTTP proxy
|
HTTP PUT a to a FTP URL with username+password - over HTTP proxy
|
||||||
</name>
|
</name>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ data blobb
|
|||||||
ipv6
|
ipv6
|
||||||
</features>
|
</features>
|
||||||
<server>
|
<server>
|
||||||
ftp
|
ftp-ipv6
|
||||||
</server>
|
</server>
|
||||||
<name>
|
<name>
|
||||||
Get two FTP files with no remote EPRT support
|
Get two FTP files with no remote EPRT support
|
||||||
|
|||||||
@@ -7,8 +7,11 @@
|
|||||||
# Client-side
|
# Client-side
|
||||||
<client>
|
<client>
|
||||||
<server>
|
<server>
|
||||||
file
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
# tool is what to use instead of 'curl'
|
# tool is what to use instead of 'curl'
|
||||||
<tool>
|
<tool>
|
||||||
lib501
|
lib501
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
<server>
|
<server>
|
||||||
none
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
# tool is what to use instead of 'curl'
|
# tool is what to use instead of 'curl'
|
||||||
<tool>
|
<tool>
|
||||||
lib504
|
lib504
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ FAILURE
|
|||||||
<server>
|
<server>
|
||||||
none
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
HTTP, urlglob retrieval with bad range
|
HTTP, urlglob retrieval with bad range
|
||||||
</name>
|
</name>
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ FAILURE
|
|||||||
<server>
|
<server>
|
||||||
none
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
HTTP, -O with no file name part in the URL
|
HTTP, -O with no file name part in the URL
|
||||||
</name>
|
</name>
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ contents
|
|||||||
<server>
|
<server>
|
||||||
http
|
http
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
ftp
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
FTP over HTTP proxy
|
FTP over HTTP proxy
|
||||||
</name>
|
</name>
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ FAILURE
|
|||||||
<server>
|
<server>
|
||||||
none
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
urlglob with bad -o #[num] usage
|
urlglob with bad -o #[num] usage
|
||||||
</name>
|
</name>
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ my $has_gnutls; # set if libcurl is built with GnuTLS
|
|||||||
my $has_nss; # set if libcurl is built with NSS
|
my $has_nss; # set if libcurl is built with NSS
|
||||||
my $has_textaware; # set if running on a system that has a text mode concept
|
my $has_textaware; # set if running on a system that has a text mode concept
|
||||||
# on files. Windows for example
|
# on files. Windows for example
|
||||||
|
my @protocols; # array of supported protocols
|
||||||
|
|
||||||
my $skipped=0; # number of tests skipped; reported in main loop
|
my $skipped=0; # number of tests skipped; reported in main loop
|
||||||
my %skipped; # skipped{reason}=counter, reasons for skip
|
my %skipped; # skipped{reason}=counter, reasons for skip
|
||||||
@@ -1021,8 +1022,16 @@ sub checksystem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif($_ =~ /^Protocols: (.*)/i) {
|
elsif($_ =~ /^Protocols: (.*)/i) {
|
||||||
# these are the supported protocols, we don't use this knowledge
|
# these are the protocols compiled in to this libcurl
|
||||||
# at this point
|
@protocols = split(' ', $1);
|
||||||
|
|
||||||
|
# Generate a "proto-ipv6" version of each protocol to match the
|
||||||
|
# IPv6 <server> name. This works even if IPv6 support isn't
|
||||||
|
# compiled in because the <features> test will fail.
|
||||||
|
push @protocols, map($_ . "-ipv6", @protocols);
|
||||||
|
|
||||||
|
# 'none' is used in test cases to mean no server
|
||||||
|
push @protocols, ('none');
|
||||||
}
|
}
|
||||||
elsif($_ =~ /^Features: (.*)/i) {
|
elsif($_ =~ /^Features: (.*)/i) {
|
||||||
$feat = $1;
|
$feat = $1;
|
||||||
@@ -1283,6 +1292,10 @@ sub singletest {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# See if this "feature" is in the list of supported protocols
|
||||||
|
elsif (grep /^$f$/, @protocols) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
$why = "curl lacks $f support";
|
$why = "curl lacks $f support";
|
||||||
last;
|
last;
|
||||||
@@ -2065,6 +2078,12 @@ sub serverfortest {
|
|||||||
return "no server specified";
|
return "no server specified";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $proto = lc($what[0]);
|
||||||
|
chomp $proto;
|
||||||
|
if (! grep /^$proto$/, @protocols) {
|
||||||
|
return "curl lacks $proto support";
|
||||||
|
}
|
||||||
|
|
||||||
return &startservers(@what);
|
return &startservers(@what);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user