Skip to content
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

cmd/vet: reenable disabled cgo test #28829

Closed
alandonovan opened this issue Nov 16, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@alandonovan
Copy link
Contributor

commented Nov 16, 2018

$ GOARCH=386 go test cmd/vet
--- FAIL: TestVet (0.58s)
    --- FAIL: TestVet/cgo (0.06s)
        vet_test.go:152: error check failed: 
            cgo.go:16: missing error "embedded pointer"
            cgo.go:17: missing error "embedded pointer"
            Unmatched Errors:
            can't load package: package cgo: build constraints exclude all Go files in /usr/local/google/home/adonovan/goroot/src/cmd/vet/testdata/src/cgo
FAIL
FAIL    cmd/vet 1.175s

The cgo test should be skipped in platforms that don't use cgo (otherwise build tags cause the package to be empty). But there's some confusion about whether 386 is a cgo platform. 'go list' says no, but build.Default.CgoEnabled says yes.

Investigate, fix and reenable the test.

@gopherbot

This comment has been minimized.

Copy link

commented Nov 16, 2018

Change https://golang.org/cl/149937 mentions this issue: cmd/vet: fix two failing test cases

gopherbot pushed a commit that referenced this issue Nov 16, 2018

cmd/vet: fix two failing test cases
Select linux/arm64 for the asm test.

Disable the cgo test for now.
Will fix properly in a follow-up.
Filed Issue 28829 to track it.

Updates #28829

Change-Id: Ic05f619700b06e91c43f8c150b089b8e77d92c85
Reviewed-on: https://go-review.googlesource.com/c/149937
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@gopherbot

This comment has been minimized.

Copy link

commented Nov 16, 2018

Change https://golang.org/cl/149958 mentions this issue: cmd/vet: reenable cgo test

@gopherbot gopherbot closed this in 3757284 Nov 16, 2018

bradfitz pushed a commit that referenced this issue Nov 21, 2018

cmd/vet: fix two failing test cases
Select linux/arm64 for the asm test.

Disable the cgo test for now.
Will fix properly in a follow-up.
Filed Issue 28829 to track it.

Updates #28829

Change-Id: Ic05f619700b06e91c43f8c150b089b8e77d92c85
Reviewed-on: https://go-review.googlesource.com/c/149937
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>

bradfitz pushed a commit that referenced this issue Nov 21, 2018

cmd/vet: reenable cgo test
The reason the 386 trybot was happy but 'GOARCH=386 go test cmd/vet'
was not is that CgoEnabled defaults to false in a cross build;
I have no idea why. Now we ask the go command for the effective
value so that the test works in both cases.

Also, remove stale comment.

Fixes #28829

Change-Id: I1210af34da6986f47924059de5c1f08b2824ace9
Reviewed-on: https://go-review.googlesource.com/c/149958
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.