From 78b4518e31b39aac4fbad1679db95b3f526229a7 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Wed, 8 Dec 2021 16:47:56 -0500 Subject: [PATCH] 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 --- src/crypto/x509/verify_test.go | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- 2.50.0