]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/x509: skip known TestSystemVerify flakes on windows-*-2008 builders
authorBryan C. Mills <bcmills@google.com>
Wed, 8 Dec 2021 21:47:56 +0000 (16:47 -0500)
committerBryan Mills <bcmills@google.com>
Thu, 9 Dec 2021 17:16:12 +0000 (17:16 +0000)
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>
src/crypto/x509/verify_test.go

index 05d521c09d5d3e0454fbcfedccbdb32290665685..f4ea08bbf5516a7ee53108ea5a945ebc0c3aff92 100644 (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 {