]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: use '-4' where needed
authorStefan Eissing <stefan@eissing.org>
Thu, 26 Sep 2024 13:20:43 +0000 (15:20 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 26 Sep 2024 21:36:09 +0000 (23:36 +0200)
Our test servers run either on ipv4 *or* on ipv6, as requested.
A test case using 'localhost' or '*.local' in the url needs to
run with the specific version of the server started.

Otherwise, curl's "happy eyeball"ing will connect to another
server that may be running due to parallel testing or for some
other reasons.

Note that port reuse here depends on the OS strategy and it
seems netbsd is especially likely to hit this.

Closes #15060

21 files changed:
tests/data/test2033
tests/data/test2034
tests/data/test2035
tests/data/test2037
tests/data/test2038
tests/data/test2041
tests/data/test2042
tests/data/test2048
tests/data/test2070
tests/data/test2079
tests/data/test2087
tests/data/test3000
tests/data/test3001
tests/data/test3023
tests/data/test3024
tests/data/test310
tests/data/test311
tests/data/test312
tests/data/test313
tests/data/test389
tests/data/test392

index 6aa5e50f036d12ead1c620419719983e72fa4906..01056594d9b5f611ec28e305aac1faf9c239f98c 100644 (file)
@@ -40,7 +40,7 @@ simple HTTPS GET with DER public key pinning (Schannel variant)
 CURL_SSL_BACKEND=schannel
  </setenv>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 82b205555f39cba1010de4a1c0552e1047c828e0..68963bd5bd973a892a50b800353d8d1984e35608 100644 (file)
@@ -36,7 +36,7 @@ https Server-localhost-sv.pem
 simple HTTPS GET with DER public key pinning
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.der https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 9680a3634676d0d4c85fb201e9b01413d446790b..66fa5874cc750518d1b909b45b3e5251b0e60800 100644 (file)
@@ -27,7 +27,7 @@ https Server-localhost-sv.pem
 HTTPS wrong DER pinnedpubkey but right CN
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.der https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.der https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index f55e6b11c441ba2413b4675743c7bc6acbc0ff0f..50c4c72e9d171d0ce0be1d1e530aa7a9213a7c97 100644 (file)
@@ -36,7 +36,7 @@ https Server-localhost-sv.pem
 simple HTTPS GET with PEM public key pinning
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 36d399fa621e0024e99409aa7e06f7b05dcaecf7..2ec01af65974b8b2f5edbebc3708386f414f672a 100644 (file)
@@ -27,7 +27,7 @@ https Server-localhost-sv.pem
 HTTPS wrong PEM pinnedpubkey but right CN
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pem https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pem https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 0b6fa9a18fb5b23923732c0219b6b70e5533ee16..e4ee415e9453e90a93780e6a56aa9c2ff33a12a6 100644 (file)
@@ -36,7 +36,7 @@ https Server-localhost-sv.pem
 simple HTTPS GET with base64-sha256 public key pinning
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//%sha256b64file[%SRCDIR/certs/Server-localhost-sv.pub.der]sha256b64file% https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//%sha256b64file[%SRCDIR/certs/Server-localhost-sv.pub.der]sha256b64file% https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index f4cf340fdb76d124e11dc1b8ab8944f6e46115e4..13a0fad2477ba636204c450ce9e78ac02afa11bc 100644 (file)
@@ -27,7 +27,7 @@ https Server-localhost-sv.pem
 HTTPS wrong base64-sha256 pinnedpubkey but right CN
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//bSIggTf+ikMG0CtmDlpMVBd7yi7H1md4URogRPqerso= https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//bSIggTf+ikMG0CtmDlpMVBd7yi7H1md4URogRPqerso= https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index f14c8fbe8244bd16821ba82a4a476e565f993ea6..63da9c761b414c66ffcb6bf39f19241e797fdd8f 100644 (file)
@@ -26,7 +26,7 @@ https Server-localhost-sv.pem
 pinnedpubkey no-match must fail even when insecure
 </name>
 <command>
---insecure --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost.nn-sv.pub.der https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --insecure --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost.nn-sv.pub.der https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index abb22fc3258cc5b89c5b490f1d3a7aa6abebe5ad..e46f4588f99c59d600762f512489b14daf16fa7b 100644 (file)
@@ -39,7 +39,7 @@ Ignore certificate revocation "best effort" strategy
 CURL_SSL_BACKEND=schannel
  </setenv>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 13e4fe1dd7dc120ebf03636adf282b83cdb6730a..09e36be2b2fd988ec17beec88d8dea2d14931fdb 100644 (file)
@@ -40,7 +40,7 @@ simple HTTPS GET with PEM public key pinning (Schannel variant)
 CURL_SSL_BACKEND=schannel
  </setenv>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey %SRCDIR/certs/Server-localhost-sv.pub.pem --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 8084e78ad427a2921ec5ee6a07f92e350e786cd8..5b7cce5d48c7b77dec1b7f5319198466c5c92c79 100644 (file)
@@ -40,7 +40,7 @@ simple HTTPS GET with base64-sha256 public key pinning (Schannel variant)
 CURL_SSL_BACKEND=schannel
  </setenv>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//%sha256b64file[%SRCDIR/certs/Server-localhost-sv.pub.der]sha256b64file% --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --pinnedpubkey sha256//%sha256b64file[%SRCDIR/certs/Server-localhost-sv.pub.der]sha256b64file% --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 6e7f7db4f62918607c338008886a5f950b530def..43c2695c98d1ad12c1564b27f37f36b1b8785635 100644 (file)
@@ -35,7 +35,7 @@ https Server-localhost-firstSAN-sv.pem
 HTTPS GET to localhost, first subject alt name matches, CN does not match
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 2d8817f0d0c3d43718fd4b13455bac140f0373dc..9bfeb708a54fcf93183d07f6f1932ec155307918 100644 (file)
@@ -35,7 +35,7 @@ https Server-localhost-lastSAN-sv.pem
 HTTPS GET to localhost, last subject alt name matches, CN does not match
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index a5bba7683dd232ba883de906db13a2a1d95ba794..09e66331df256cd66f39778432918a50b56949e9 100644 (file)
@@ -39,7 +39,7 @@ HTTPS GET to localhost, first subject alt name matches, CN does not match (Schan
 CURL_SSL_BACKEND=schannel
 </setenv>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index af1549c62b9a3d0d427e1f3fdead078c37080840..11c7643ff69ae48d3aa446df60e8faf34cb06b9d 100644 (file)
@@ -39,7 +39,7 @@ HTTPS GET to localhost, last subject alt name matches, CN does not match (Schann
 CURL_SSL_BACKEND=schannel
 </setenv>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --ssl-revoke-best-effort https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index f7427981cc3b0bd8d709e0137d5b81501f22f352..1baf32095027aef2bd6f7834f1f31ded475f8ebe 100644 (file)
@@ -35,7 +35,7 @@ https Server-localhost-sv.pem
 simple HTTPS GET
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index e16341274147e8ac7e0d4c28497ddd9a9a29f3c4..61fe2e90c057bce50922c03d973ad7122a8b0547 100644 (file)
@@ -26,7 +26,7 @@ https Server-localhost0h-sv.pem
 HTTPS wrong subjectAltName but right CN
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 5466c3eaab414e5a93778204d34e8ba6cec9bebe..52fc37cbd72b514abd7d2585c0802d63fcd4d0b5 100644 (file)
@@ -26,7 +26,7 @@ https Server-localhost.nn-sv.pem
 HTTPS GET to localhost and null-prefixed CN cert
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 3d31dc6808887b86a77728f24332c035511b95fb..cff9a9b25dc7c4e8f8aac79ff37ee8adf10722f8 100644 (file)
@@ -22,7 +22,7 @@ https Server-localhost-sv.pem
 CRL test
 </name>
 <command>
---cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --crlfile %SRCDIR/certs/Server-localhost-sv.crl https://localhost:%HTTPSPORT/%TESTNUMBER
+-4 --cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --crlfile %SRCDIR/certs/Server-localhost-sv.crl https://localhost:%HTTPSPORT/%TESTNUMBER
 </command>
 </client>
 
index 2dc0731b8e75f58d196472b8622eb3ab1bf75e51..a38d70eef636ae7c7541f291e8cf4a50b4c549fd 100644 (file)
@@ -38,7 +38,7 @@ local-http
 *.localhost is a local host
 </name>
 <command>
-http://curlmachine.localhost:%HTTPPORT/%TESTNUMBER
+-4 http://curlmachine.localhost:%HTTPPORT/%TESTNUMBER
 </command>
 # Ensure that we're running on localhost
 </client>
index d24841c6168d0861871c5b708bdb19c67cc03fcd..a9f756d9482837f65ef9174aa77b72091745238e 100644 (file)
@@ -35,7 +35,7 @@ HTTP secure cookies over localhost
 TZ=GMT
 </setenv>
 <command>
-http://localhost:%HTTPPORT/%TESTNUMBER -b none http://localhost:%HTTPPORT/%TESTNUMBER
+-4 http://localhost:%HTTPPORT/%TESTNUMBER -b none http://localhost:%HTTPPORT/%TESTNUMBER
 </command>
 <features>
 cookies