t5500, t5601: skip tests which exercise paths with '[::1]' on Cygwin

Parsing repositories which contain '[::1]' is broken on Cygwin. It seems as if Cygwin is confusing those as drive letter prefixes or something like this, but I couldn't deduce the actual root cause. Mark those tests as broken for now. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Taylor Blau <me@ttaylorr.com>

Patrick Steinhardt committed Oct 16, 2024 at 10:13 UTC 5f8af25ff95bf2a10dbd7a489e49071d84d3f8b5
2 files changed +19 -6
t/t5500-fetch-pack.sh
+10 -4
@@ -774,7 +774,7 @@ do
774 # file with scheme
775 for p in file
776 do
777 - test_expect_success !MINGW "fetch-pack --diag-url $p://$h/$r" '
777 + test_expect_success !WINDOWS "fetch-pack --diag-url $p://$h/$r" '
778 check_prot_path $p://$h/$r $p "/$r"
779 '
780 test_expect_success MINGW "fetch-pack --diag-url $p://$h/$r" '
@@ -784,7 +784,7 @@ do
784 check_prot_path $p:///$r $p "/$r"
785 '
786 # No "/~" -> "~" conversion for file
787 - test_expect_success !MINGW "fetch-pack --diag-url $p://$h/~$r" '
787 + test_expect_success !WINDOWS "fetch-pack --diag-url $p://$h/~$r" '
788 check_prot_path $p://$h/~$r $p "/~$r"
789 '
790 test_expect_success MINGW "fetch-pack --diag-url $p://$h/~$r" '
@@ -806,11 +806,17 @@ do
806 p=ssh
807 for h in host [::1]
808 do
809 - test_expect_success "fetch-pack --diag-url $h:$r" '
809 + expectation="success"
810 + if test_have_prereq CYGWIN && test "$h" = "[::1]"
811 + then
812 + expectation="failure"
813 + fi
814 +
815 + test_expect_$expectation "fetch-pack --diag-url $h:$r" '
816 check_prot_host_port_path $h:$r $p "$h" NONE "$r"
817 '
818 # Do "/~" -> "~" conversion
813 - test_expect_success "fetch-pack --diag-url $h:/~$r" '
819 + test_expect_$expectation "fetch-pack --diag-url $h:/~$r" '
820 check_prot_host_port_path $h:/~$r $p "$h" NONE "~$r"
821 '
822 done
t/t5601-clone.sh
+9 -2
@@ -530,10 +530,17 @@ do
530 '
531 done
532
533 +# Parsing of paths that look like IPv6 addresses is broken on Cygwin.
534 +expectation_for_ipv6_tests=success
535 +if test_have_prereq CYGWIN
536 +then
537 + expectation_for_ipv6_tests=failure
538 +fi
539 +
540 #ipv6
541 for repo in rep rep/home/project 123
542 do
536 - test_expect_success "clone [::1]:$repo" '
543 + test_expect_$expectation_for_ipv6_tests "clone [::1]:$repo" '
544 test_clone_url [::1]:$repo ::1 "$repo"
545 '
546 done
@@ -542,7 +549,7 @@ test_expect_success "clone host:/~repo" '
549 test_clone_url host:/~repo host "~repo"
550 '
551
545 -test_expect_success "clone [::1]:/~repo" '
552 +test_expect_$expectation_for_ipv6_tests "clone [::1]:/~repo" '
553 test_clone_url [::1]:/~repo ::1 "~repo"
554 '
555