Skip to content

crypto/x509: root_darwin_test.go fails #18224

Description

@YoshikiShibata

Please answer these questions before submitting your issue. Thanks!

What did you do?

Rebuild the latest tip with all.bash.

What did you expect to see?

All tests passed

What did you see instead?

##### Testing without libgcc.
--- FAIL: TestSystemRoots (1.89s)
	root_darwin_test.go:32: got 172 roots
	root_darwin_test.go:32: got 149 roots
	root_darwin_test.go:34: want at least 150 system roots, have 149
FAIL
FAIL	crypto/x509	3.186s
2016/12/07 13:46:48 Failed: exit status 1
ok  	net	0.033s
ok  	os/user	0.024s

As far as I remember, I encountered this failure twice. In the source code, 150 is hard coded, but I'm not sure the value is reasonable or not:

    for _, tt := range []*CertPool{sysRoots, execRoots} {
        if tt == nil {
            t.Fatal("no system roots")
        }
        // On Mavericks, there are 212 bundled certs; require only
        // 150 here, since this is just a sanity check, and the
        // exact number will vary over time.
        t.Logf("got %d roots", len(tt.certs))
        if want, have := 150, len(tt.certs); have < want {
            t.Fatalf("want at least %d system roots, have %d", want, have)
        }
    }

Does this issue reproduce with the latest release (go1.7.4)?

I didn't try.

System details

go version devel +0be4ef3 Wed Dec 7 01:12:22 2016 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/yoshiki/gocode:/Users/yoshiki/exercises/gpl:/Users/yoshiki/oak"
GORACE=""
GOROOT="/Users/yoshiki/tools/go"
GOTOOLDIR="/Users/yoshiki/tools/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pb/c7_4_d355ng5zfm4r_jg2gg00000gn/T/go-build151787539=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version devel +0be4ef3 Wed Dec 7 01:12:22 2016 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +0be4ef3 Wed Dec 7 01:12:22 2016 +0000 X:framepointer
uname -v: Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.12.1
BuildVersion:	16B2555
lldb --version: lldb-360.1.65

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions