From d07504aa8d97b31643ceb876a53691161b522a8c Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Sat, 2 Aug 2025 12:55:11 +0200 Subject: [PATCH] unit2600: add another case Add a case with 1 ipv4 and 3 ipv6 and check that all are attempted with the correct minimum duration before failures. To check that more ipv6 than ipv4 lead to the correct behaviour. Closes #18144 --- tests/unit/unit2600.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/unit/unit2600.c b/tests/unit/unit2600.c index f6f909bb1e..820176b2d9 100644 --- a/tests/unit/unit2600.c +++ b/tests/unit/unit2600.c @@ -375,7 +375,6 @@ static CURLcode test_unit2600(const char *arg) { 4, TURL, "test.com:123:::1,::2", CURL_IPRESOLVE_WHATEVER, CNCT_TMOT, 150, 250, 250, 0, 2, 400, TC_TMOT, R_FAIL, NULL }, /* 2 ipv6, fails after ~400ms, reports COULDNT_CONNECT */ - { 5, TURL, "test.com:123:192.0.2.1,::1", CURL_IPRESOLVE_WHATEVER, CNCT_TMOT, 150, 250, 250, 1, 1, 350, TC_TMOT, R_FAIL, "v6" }, /* mixed ip4+6, v6 always first, v4 kicks in on HE, fails after ~350ms */ @@ -390,6 +389,10 @@ static CURLcode test_unit2600(const char *arg) CNCT_TMOT, 150, 500, 500, 0, 1, 400, TC_TMOT, R_FAIL, NULL }, /* mixed ip4+6, but only use v6, check it uses full connect timeout, although another address of the 'wrong' family is available */ + { 9, TURL, "test.com:123:::1,192.0.2.1,::2,::3", CURL_IPRESOLVE_WHATEVER, + CNCT_TMOT, 50, 400, 400, 1, 3, 550, TC_TMOT, R_FAIL, NULL }, + /* 1 v4, 3 v6, fails after (3*HE)+400ms, ~550ms, COULDNT_CONNECT */ + #endif }; -- 2.47.3