New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/text/currency: TestLinking fails on ppc64le, s390x #17538
Comments
A similar issue is causing failures for multiple builds in text right now. The failures appear to be flaky, with no obvious culprit CL.
linux-s390x-ibm: https://build.golang.org/log/2019c0bfd906c37ee9174386a66f69e1e9f71e92 /cc @mpvl |
This is failing pretty consistently again for linux-s390x-ibm builds of x/text. |
/cc @laboger |
Change https://golang.org/cl/170783 mentions this issue: |
It fails on a bunch of builders and it's not clear what it's testing. It hasn't been fixed since Oct 2016 so it gets disabled. Updates golang/go#17538 Change-Id: I0f454c46b31b8306cc604c36ec6d06cc6ad703b5 Reviewed-on: https://go-review.googlesource.com/c/text/+/170783 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
If you resurrect this, see net/http's test: // Test that cmd/go doesn't link in the HTTP server.
//
// This catches accidental dependencies between the HTTP transport and
// server code.
func TestCmdGoNoHTTPServer(t *testing.T) {
t.Parallel()
goBin := testenv.GoToolPath(t)
out, err := exec.Command(goBin, "tool", "nm", goBin).CombinedOutput()
if err != nil {
t.Fatalf("go tool nm: %v: %s", err, out)
}
wantSym := map[string]bool{
// Verify these exist: (sanity checking this test)
"net/http.(*Client).Get": true,
"net/http.(*Transport).RoundTrip": true,
// Verify these don't exist:
"net/http.http2Server": false,
"net/http.(*Server).Serve": false,
"net/http.(*ServeMux).ServeHTTP": false,
"net/http.DefaultServeMux": false,
}
for sym, want := range wantSym {
got := bytes.Contains(out, []byte(sym))
if !want && got {
t.Errorf("cmd/go unexpectedly links in HTTP server code; found symbol %q in cmd/go", sym)
}
if want && !got {
t.Errorf("expected to find symbol %q in cmd/go; not found", sym)
}
}
} |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.7.3
What operating system and processor architecture are you using (
go env
)?It's a ppc64le system running Ubuntu (various versions, version not important)
What did you do?
go test -v -p 1 golang.org/x/text/...
What did you expect to see?
Tests passing
What did you see instead?
--- FAIL: TestLinking (1.68s)
currency_test.go:155: size(symbols)-size(base) was 772; want > 2K
This was part of building for the distribution, you can see the full log at:
https://launchpadlibrarian.net/290258937/buildlog_ubuntu-zesty-ppc64el.golang-x-text_0.0~git20161013.0.c745997-1ubuntu1~ppa1_BUILDING.txt.gz
This passes with Go 1.6. But in general this test seems to be a bit of a hostage to the future. I think I'm going to add a distro patch disabling this (and the one in dict_test.go) for now.
The text was updated successfully, but these errors were encountered: