mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
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:
parent
7c144d5a7e
commit
1962ebf8e7
4
CHANGES
4
CHANGES
@ -6,6 +6,10 @@
|
||||
|
||||
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)
|
||||
- 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
|
||||
|
@ -106,9 +106,6 @@ may have been fixed since this was written!
|
||||
acknowledged after the actual TCP connect (during the SOCKS "negotiate"
|
||||
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
|
||||
(fake) user name (this concerns both curl and the lib) because the code
|
||||
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>
|
||||
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>
|
||||
|
||||
<features>
|
||||
@ -134,6 +144,10 @@ libz
|
||||
netrc_debug
|
||||
OpenSSL
|
||||
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>
|
||||
|
||||
<killserver>
|
||||
|
@ -17,6 +17,9 @@ FAILURE
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
http
|
||||
</features>
|
||||
<name>
|
||||
attempt connect to non-listening socket
|
||||
</name>
|
||||
|
@ -16,6 +16,9 @@ FAILURE
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
http
|
||||
</features>
|
||||
<name>
|
||||
attempt connect to non-existing host name
|
||||
</name>
|
||||
|
@ -13,7 +13,7 @@ moo
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
basic file:// file
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
missing file:// file
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
two file:// URLs to stdout
|
||||
|
@ -13,7 +13,7 @@ moo
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
file:/path URL with a single slash
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
"upload" with file://
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
"upload" with file://
|
||||
|
@ -16,6 +16,9 @@ blablabla
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<features>
|
||||
ftp
|
||||
</features>
|
||||
<name>
|
||||
HTTP PUT a to a FTP URL with username+password - over HTTP proxy
|
||||
</name>
|
||||
|
@ -12,7 +12,7 @@ data blobb
|
||||
ipv6
|
||||
</features>
|
||||
<server>
|
||||
ftp
|
||||
ftp-ipv6
|
||||
</server>
|
||||
<name>
|
||||
Get two FTP files with no remote EPRT support
|
||||
|
@ -7,8 +7,11 @@
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
file
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
http
|
||||
</features>
|
||||
# tool is what to use instead of 'curl'
|
||||
<tool>
|
||||
lib501
|
||||
|
@ -8,6 +8,9 @@
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
http
|
||||
</features>
|
||||
# tool is what to use instead of 'curl'
|
||||
<tool>
|
||||
lib504
|
||||
|
@ -17,6 +17,9 @@ FAILURE
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
http
|
||||
</features>
|
||||
<name>
|
||||
HTTP, urlglob retrieval with bad range
|
||||
</name>
|
||||
|
@ -15,6 +15,9 @@ FAILURE
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
http
|
||||
</features>
|
||||
<name>
|
||||
HTTP, -O with no file name part in the URL
|
||||
</name>
|
||||
|
@ -27,6 +27,9 @@ contents
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<features>
|
||||
ftp
|
||||
</features>
|
||||
<name>
|
||||
FTP over HTTP proxy
|
||||
</name>
|
||||
|
@ -15,6 +15,9 @@ FAILURE
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<features>
|
||||
http
|
||||
</features>
|
||||
<name>
|
||||
urlglob with bad -o #[num] usage
|
||||
</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_textaware; # set if running on a system that has a text mode concept
|
||||
# on files. Windows for example
|
||||
my @protocols; # array of supported protocols
|
||||
|
||||
my $skipped=0; # number of tests skipped; reported in main loop
|
||||
my %skipped; # skipped{reason}=counter, reasons for skip
|
||||
@ -1021,8 +1022,16 @@ sub checksystem {
|
||||
}
|
||||
}
|
||||
elsif($_ =~ /^Protocols: (.*)/i) {
|
||||
# these are the supported protocols, we don't use this knowledge
|
||||
# at this point
|
||||
# these are the protocols compiled in to this libcurl
|
||||
@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) {
|
||||
$feat = $1;
|
||||
@ -1283,6 +1292,10 @@ sub singletest {
|
||||
next;
|
||||
}
|
||||
}
|
||||
# See if this "feature" is in the list of supported protocols
|
||||
elsif (grep /^$f$/, @protocols) {
|
||||
next;
|
||||
}
|
||||
|
||||
$why = "curl lacks $f support";
|
||||
last;
|
||||
@ -2065,6 +2078,12 @@ sub serverfortest {
|
||||
return "no server specified";
|
||||
}
|
||||
|
||||
my $proto = lc($what[0]);
|
||||
chomp $proto;
|
||||
if (! grep /^$proto$/, @protocols) {
|
||||
return "curl lacks $proto support";
|
||||
}
|
||||
|
||||
return &startservers(@what);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user