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 <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
This commit is contained in:
Bryan C. Mills 2021-12-08 16:47:56 -05:00 committed by Bryan Mills
parent 307d7c6747
commit 78b4518e31
1 changed files with 4 additions and 0 deletions

View File

@ -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 {