tests: Stop referring to server ports when they're not used

Several tests referred to specific server ports even when the test
didn't actually use that server or specify that it's needed. In such
cases, the test harness substitutes the text "[not running]" as the port
number which causes many such tests to fail due to the inability to
parse the URL.  These tests are changed to use %NOLISTENPORT which will
always be substituted correctly.
This commit is contained in:
Dan Fandrich 2020-04-30 16:00:31 +02:00
parent 42d8d9a7e8
commit 5f5a7b478a
25 changed files with 25 additions and 25 deletions

View File

@ -43,7 +43,7 @@ HTTP over proxy with malformatted IDN host name
url = "http://invalid-utf8-â<>.local/page/1034"
</stdin>
<command>
-K - -x %HOSTIP:%HTTPPORT
-K - -x %HOSTIP:%NOLISTENPORT
</command>
</client>

View File

@ -35,7 +35,7 @@ perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(lan
HTTP over proxy with too long IDN host name
</name>
<command>
http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 -x %HOSTIP:%HTTPPORT
http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/1035 -x %HOSTIP:%NOLISTENPORT
</command>
</client>

View File

@ -27,7 +27,7 @@ none
HTTP GET with invalid --interface
</name>
<command>
http://%HOSTIP:%HTTPPORT/1084 --interface non-existing-host.haxx.se.
http://%HOSTIP:%NOLISTENPORT/1084 --interface non-existing-host.haxx.se.
</command>
</client>

View File

@ -29,7 +29,7 @@ none
HTTP-IPv6 GET with invalid --interface
</name>
<command>
-g "http://%HOST6IP:%HTTP6PORT/1085" --interface non-existing-host.haxx.se.
-g "http://%HOST6IP:%NOLISTENPORT/1085" --interface non-existing-host.haxx.se.
</command>
# Ensure the IPv6 stack is operational before running this test (other tests
# use the startup of the IPv6 test server as a substitute check for this).

View File

@ -19,7 +19,7 @@ none
abusing {}-globbing
</name>
<command>
"%HOSTIP:%HTTPPORT/1234[0-1]{" "%HOSTIP:%HTTPPORT/{}{}{}{"
"%HOSTIP:%NOLISTENPORT/1234[0-1]{" "%HOSTIP:%NOLISTENPORT/{}{}{}{"
</command>
</client>

View File

@ -19,7 +19,7 @@ none
</name>
# 2^62 == 4611686018427387904
<command>
"%HOSTIP:%HTTPPORT/1234[0-1]{" "%HOSTIP:%HTTPPORT/[1-4611686018427387904][1-4611686018427387904]"
"%HOSTIP:%NOLISTENPORT/1234[0-1]{" "%HOSTIP:%NOLISTENPORT/[1-4611686018427387904][1-4611686018427387904]"
</command>
</client>

View File

@ -22,7 +22,7 @@ http
HTTP URL with rubbish after port number
</name>
<command>
-g "http://[%HOSTIP]:%HTTPPORT:80/we/want/1260" "http://%HOSTIP:%HTTPPORT:80/we/want/1260" "http://user@example.com:80@localhost"
-g "http://[%HOSTIP]:%NOLISTENPORT:80/we/want/1260" "http://%HOSTIP:%NOLISTENPORT:80/we/want/1260" "http://user@example.com:80@localhost"
</command>
</client>

View File

@ -23,7 +23,7 @@ http
HTTP URL with rubbish after IPv6 bracket
</name>
<command>
-g "http://[%HOSTIP]test:%HTTPPORT/we/want/1263" "http://[%HOSTIP][%HOSTIP]:%HTTPPORT/we/want/1263" "http://user@[::1]@localhost"
-g "http://[%HOSTIP]test:%NOLISTENPORT/we/want/1263" "http://[%HOSTIP][%HOSTIP]:%NOLISTENPORT/we/want/1263" "http://user@[::1]@localhost"
</command>
</client>

View File

@ -20,7 +20,7 @@ none
too large --retry-delay value
</name>
<command>
--retry 3 --retry-delay 9223372036854776 http://%HOSTIP:%HTTPPORT/1269
--retry 3 --retry-delay 9223372036854776 http://%HOSTIP:%NOLISTENPORT/1269
</command>
</client>

View File

@ -17,7 +17,7 @@ none
Pass in string to -C
</name>
<command>
http://%HOSTIP:%HTTPPORT/1409 -C wrong
http://%HOSTIP:%NOLISTENPORT/1409 -C wrong
</command>
</client>

View File

@ -17,7 +17,7 @@ none
Pass in negative number to --max-time
</name>
<command>
http://%HOSTIP:%HTTPPORT/1410 --max-time -4
http://%HOSTIP:%NOLISTENPORT/1410 --max-time -4
</command>
</client>

View File

@ -15,7 +15,7 @@ none
too large -m timeout value
</name>
<command>
http://%HOSTIP:%HTTPPORT/1427 -m 184467440737095510
http://%HOSTIP:%NOLISTENPORT/1427 -m 184467440737095510
</command>
</client>

View File

@ -24,7 +24,7 @@ proxy
Provide illegal proxy name
</name>
<command>
--proxy "http://a:b@/x" http://%HOSTIP:%HTTPPORT
--proxy "http://a:b@/x" http://%HOSTIP:%NOLISTENPORT
</command>
</client>

View File

@ -23,7 +23,7 @@ tftp
Too long tftp filename
</name>
<command>
tftp://%HOSTIP:%TFTPPORT/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz
tftp://%HOSTIP:%NOLISTENPORT/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz
</command>
</client>

View File

@ -18,7 +18,7 @@ lib1508
Close a multi handle without using it
</name>
<command>
http://%HOSTIP:%HTTPPORT/path/1508
http://%HOSTIP:%NOLISTENPORT/path/1508
</command>
</client>

View File

@ -23,7 +23,7 @@ lib1550
verify setting pipeling blacklisting options
</name>
<command>
http://%HOSTIP:%HTTPPORT/1550
http://%HOSTIP:%NOLISTENPORT/1550
</command>
</client>
</testcase>

View File

@ -22,7 +22,7 @@ http
HTTP, -O with no slash at all in the URL
</name>
<command option="no-output">
%HOSTIP:%HTTPPORT -O
%HOSTIP:%NOLISTENPORT -O
</command>
</client>

View File

@ -24,7 +24,7 @@ proxy
try using proxy with unsupported scheme
</name>
<command>
-x foo://%HOSTIP:%HTTPPORT/219 http://%HOSTIP:%HTTPPORT/219
-x foo://%HOSTIP:%NOLISTENPORT/219 http://%HOSTIP:%NOLISTENPORT/219
</command>
</client>

View File

@ -28,7 +28,7 @@ file
file:// with (unsupported) proxy, authentication and range
</name>
<setenv>
all_proxy=http://fake:user@%HOSTIP:%HTTPPORT/
all_proxy=http://fake:user@%HOSTIP:%NOLISTENPORT/
</setenv>
<command option="no-include">
file://localhost%FILE_PWD/log/test288.txt

View File

@ -20,7 +20,7 @@ none
Try a non-boolean command line option with --no-
</name>
<command>
--no-proxy "hey" http://%HOSTIP:%HTTPPORT/333
--no-proxy "hey" http://%HOSTIP:%NOLISTENPORT/333
</command>
</client>

View File

@ -26,7 +26,7 @@ lib501
simple libcurl attempt operation without URL set
</name>
<command>
http://%HOSTIP:%HTTPPORT/501
http://%HOSTIP:%NOLISTENPORT/501
</command>
</client>

View File

@ -32,7 +32,7 @@ lib504
simple multi through local proxy without listener
</name>
<command>
http://%HOSTIP:%HTTPSPORT/504 %HOSTIP:%NOLISTENPORT
http://%HOSTIP:%NOLISTENPORT/504 %HOSTIP:%NOLISTENPORT
</command>
</client>

View File

@ -20,7 +20,7 @@ sftp
SFTP syntactically invalid host key
</name>
<command>
--hostpubmd5 00 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%POSIX_PWD/log/irrelevant-file --insecure
--hostpubmd5 00 --key curl_client_key --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%NOLISTENPORT%POSIX_PWD/log/irrelevant-file --insecure
</command>
</client>

View File

@ -30,7 +30,7 @@ HTTP, urlglob retrieval with bad range
# The error message on stdout implicitly depends on the length of the
# URL, so refuse to run if the length is unexpected.
<precheck>
perl %SRCDIR/libtest/test75.pl http://%HOSTIP:%HTTPPORT/ 22
perl %SRCDIR/libtest/test75.pl http://%HOSTIP:%NOLISTENPORT/ 22
</precheck>
</client>

View File

@ -22,7 +22,7 @@ http
HTTP, -O with no file name part in the URL
</name>
<command option="no-output">
http://%HOSTIP:%HTTPPORT/76/ -O
http://%HOSTIP:%NOLISTENPORT/76/ -O
</command>
</client>