diff --git a/CHANGES b/CHANGES index b0240bcdcdcef69fadf7ef7055e8588a7942a547..f47d35b3bc78babdf5f2cb7b85f23527f2329e24 100644 --- a/CHANGES +++ b/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 diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS index ae5fbd716ff2832d40488e2220ab12223826d83c..74bf092f8b98ab036dee49285b92a726e528f396 100644 --- a/docs/KNOWN_BUGS +++ b/docs/KNOWN_BUGS @@ -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. diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT index f1c80305834202973bdeb2190c923d443e4ea384..398915a706769ebb0674369519afe4cf74ffaaf6 100644 --- a/tests/FILEFORMAT +++ b/tests/FILEFORMAT @@ -117,7 +117,17 @@ pipe: [num] - tell the server to expect this many HTTP requests before 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. @@ -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'). diff --git a/tests/data/test19 b/tests/data/test19 index aba75d3ec0a5e58437ec5c979a850718788916c8..dd60b8cf3a96a361f6b33ea8d6232ba213960a67 100644 --- a/tests/data/test19 +++ b/tests/data/test19 @@ -17,6 +17,9 @@ FAILURE none + +http + attempt connect to non-listening socket diff --git a/tests/data/test20 b/tests/data/test20 index cd1536060bd08ddd1ab93f0304da8a3aea5d1277..d3bf305097f1b08288aa1feba568ba69eda6669d 100644 --- a/tests/data/test20 +++ b/tests/data/test20 @@ -16,6 +16,9 @@ FAILURE none + +http + attempt connect to non-existing host name diff --git a/tests/data/test200 b/tests/data/test200 index 7b5ec41ffd4e9e43e17ea152599692d5949c3307..23ac26afc980a62d7cfe50944aa545025adbeaea 100644 --- a/tests/data/test200 +++ b/tests/data/test200 @@ -13,7 +13,7 @@ moo # Client-side -none +file basic file:// file diff --git a/tests/data/test201 b/tests/data/test201 index e8ddb7fae8ef468d704046cf9add7d64330668bf..eb2422418575aaf70036c168ba584271b0670170 100644 --- a/tests/data/test201 +++ b/tests/data/test201 @@ -8,7 +8,7 @@ # Client-side -none +file missing file:// file diff --git a/tests/data/test202 b/tests/data/test202 index 5b578cbab61045e72bf414153343fa6f19ee0f82..4344d64c8ac68059f6aa3a97271d87673f550a10 100644 --- a/tests/data/test202 +++ b/tests/data/test202 @@ -8,7 +8,7 @@ # Client-side -none +file two file:// URLs to stdout diff --git a/tests/data/test203 b/tests/data/test203 index c1c04209b7b86c072a08f7e5c424d637ccfca249..c7cdce56e75539a89ee5828501c225b27a53cfae 100644 --- a/tests/data/test203 +++ b/tests/data/test203 @@ -13,7 +13,7 @@ moo # Client-side -none +file file:/path URL with a single slash diff --git a/tests/data/test204 b/tests/data/test204 index cb21c6d38363010ec7629a9b144f87b33f9208f5..c4e219e983e4859028237bdf6dd737a2fc027ba7 100644 --- a/tests/data/test204 +++ b/tests/data/test204 @@ -4,7 +4,7 @@ # Client-side -none +file "upload" with file:// diff --git a/tests/data/test205 b/tests/data/test205 index 7bef1a8687b331a2393c48dc62face9560426502..edcf7fecec09e6a340f5dc7300e26bf45fcc288f 100644 --- a/tests/data/test205 +++ b/tests/data/test205 @@ -4,7 +4,7 @@ # Client-side -none +file "upload" with file:// diff --git a/tests/data/test208 b/tests/data/test208 index 97eacbc458bb9c7ed81f9ca800e31f008b1c613a..eac3d5572c3790ec3251a9b3c33277612494b488 100644 --- a/tests/data/test208 +++ b/tests/data/test208 @@ -16,6 +16,9 @@ blablabla http + +ftp + HTTP PUT a to a FTP URL with username+password - over HTTP proxy diff --git a/tests/data/test212 b/tests/data/test212 index d745011d6279cf6759433d59d28f09d998eb0e12..655a32f38f9247e7bd652a9d8e318adad48fe4df 100644 --- a/tests/data/test212 +++ b/tests/data/test212 @@ -12,7 +12,7 @@ data blobb ipv6 -ftp +ftp-ipv6 Get two FTP files with no remote EPRT support diff --git a/tests/data/test501 b/tests/data/test501 index f8a8591572b0f059aa241b26988a3e3f01049217..99cd3b8f772e062e6f7324ec294f43294599a0e3 100644 --- a/tests/data/test501 +++ b/tests/data/test501 @@ -7,8 +7,11 @@ # Client-side -file +none + +http + # tool is what to use instead of 'curl' lib501 diff --git a/tests/data/test504 b/tests/data/test504 index 488fb5c7747d27e59f6ff2a384b967eaf0bcca55..dadd64a14d0ad6a450f109603849a5868531e68e 100644 --- a/tests/data/test504 +++ b/tests/data/test504 @@ -8,6 +8,9 @@ none + +http + # tool is what to use instead of 'curl' lib504 diff --git a/tests/data/test75 b/tests/data/test75 index 25440f5135f732aaced244d068333ad1e2b778b1..779f0d883b96714a8438c6fdb0f959fe6d9a3e74 100644 --- a/tests/data/test75 +++ b/tests/data/test75 @@ -17,6 +17,9 @@ FAILURE none + +http + HTTP, urlglob retrieval with bad range diff --git a/tests/data/test76 b/tests/data/test76 index d4094038b5da183c0c5bfc8e59ceb601c4c27978..ada3a33595621e589302f23cca36b46e1d82eeb2 100644 --- a/tests/data/test76 +++ b/tests/data/test76 @@ -15,6 +15,9 @@ FAILURE none + +http + HTTP, -O with no file name part in the URL diff --git a/tests/data/test79 b/tests/data/test79 index 382eddde7f75b4bed86fa2e7a8ace699a32a51b3..db97635e0bb15585257d5be2dbc06c4d44825ff2 100644 --- a/tests/data/test79 +++ b/tests/data/test79 @@ -27,6 +27,9 @@ contents http + +ftp + FTP over HTTP proxy diff --git a/tests/data/test87 b/tests/data/test87 index 77316569016e55edb75361fe3bf5aeedb8c1806b..40b274b2ef0f5c30110886e8b6e0c07aecb3071e 100644 --- a/tests/data/test87 +++ b/tests/data/test87 @@ -15,6 +15,9 @@ FAILURE none + +http + urlglob with bad -o #[num] usage diff --git a/tests/runtests.pl b/tests/runtests.pl index aeff8b4fa5df98c39565f2d013dcea2e0245472c..5fb45b1719ba0a9045933cd0ca7106bf953f0bd4 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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 name. This works even if IPv6 support isn't + # compiled in because the 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); }