From: Bryan C. Mills Date: Wed, 8 Dec 2021 21:47:56 +0000 (-0500) Subject: crypto/x509: skip known TestSystemVerify flakes on windows-*-2008 builders X-Git-Tag: go1.18beta1~33 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=78b4518e31b39aac4fbad1679db95b3f526229a7;p=gostls13.git crypto/x509: skip known TestSystemVerify flakes on windows-*-2008 builders The "-2008" builders are the only ones on which the failure has been observed, so I suspect that it is due to a platform bug fixed in a subsequent release. Since no one has added a workaround since #19564 was filed over four years ago, I'm assuming that no workaround is planned for this issue. Let's add a skip for the known failure mode and call it at that. Fixes #19564 Change-Id: Iefc22d1cc78bfdc79c845eb60cac22e26caf388c Reviewed-on: https://go-review.googlesource.com/c/go/+/370377 Trust: Bryan Mills Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Roland Shoemaker Reviewed-by: Filippo Valsorda --- diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go index 05d521c09d..f4ea08bbf5 100644 --- a/src/crypto/x509/verify_test.go +++ b/src/crypto/x509/verify_test.go @@ -13,6 +13,7 @@ import ( "encoding/pem" "errors" "fmt" + "internal/testenv" "math/big" "runtime" "strings" @@ -469,6 +470,9 @@ func testVerify(t *testing.T, test verifyTest, useSystemRoots bool) { chains, err := leaf.Verify(opts) if test.errorCallback == nil && err != nil { + if runtime.GOOS == "windows" && strings.HasSuffix(testenv.Builder(), "-2008") && err.Error() == "x509: certificate signed by unknown authority" { + testenv.SkipFlaky(t, 19564) + } t.Fatalf("unexpected error: %v", err) } if test.errorCallback != nil {