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/go: go test -c does not respect gcflags sometimes [1.11 backport] #28346

Closed
gopherbot opened this issue Oct 24, 2018 · 9 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases Debugging FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@ianlancetaylor requested issue #27681 to be considered for backport to the next 1.11 minor release.

As far as I can see, this hasn't been fixed on tip yet. CC @bcmills

@gopherbot please open a backport to 1.11

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Oct 24, 2018
@gopherbot gopherbot added this to the Go1.11.2 milestone Oct 24, 2018
@katiehockman katiehockman added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Oct 29, 2018
@katiehockman
Copy link
Contributor

Approved since this is a regression. Please follow the instructions at https://github.com/golang/go/wiki/MinorReleases to create the cherrypick CL.

@katiehockman katiehockman added CherryPickCandidate Used during the release process for point releases and removed CherryPickApproved Used during the release process for point releases labels Oct 30, 2018
@katiehockman
Copy link
Contributor

Removed the approved label since the original CL has not been merged yet. Once it is, and the issue is closed, this can be re-approved assuming it is still appropriate for backport.

@bradfitz bradfitz modified the milestones: Go1.11.2, Go1.11.3 Nov 1, 2018
@bradfitz
Copy link
Contributor

bradfitz commented Nov 1, 2018

Bumping to Go 1.11.3 since there's no fix on master yet.

@dmitshur dmitshur modified the milestones: Go1.11.3, Go1.11.4 Dec 13, 2018
@FiloSottile FiloSottile modified the milestones: Go1.11.4, Go1.11.5 Dec 15, 2018
@webern
Copy link

webern commented Dec 31, 2018

I cannot tell from the Github issues what patch version of go1.11 the backport resolution of this issue is slated for. I would like to know when this will be/is fixed.

The most recent comment from @bradfitz suggests 1.11.3, but 1.11.4 has already been released.

@ianlancetaylor
Copy link
Contributor

There is still no fix on master.

@jayconrod jayconrod self-assigned this Jan 3, 2019
@katiehockman katiehockman added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Jan 4, 2019
@katiehockman
Copy link
Contributor

The change has been fixed on master, approved the cherry pick after speaking with @jayconrod. Sounds like this meets the backport criteria of being a serious issue with no workaround.

@jayconrod
Copy link
Contributor

@aarzilli Would you mind creating a cherry-pick CL, following the procedure at Making cherry-pick CLs? I'd be happy to review and approve again.

@gopherbot
Copy link
Author

Change https://golang.org/cl/156377 mentions this issue: [release-branch.go1.11] cmd/go: respect gcflags, ldflags in 'go test'

@gopherbot
Copy link
Author

Closed by merging e39e43d to release-branch.go1.11.

gopherbot pushed a commit that referenced this issue Jan 7, 2019
Fixes bug introduced by https://golang.org/cl/129059 where
gcflags='all=...' and ldflags='all=...' would not be applied to some
packages built by 'go test'.

LoadImport used to set gcflags/ldflags for the Package objects it
created, in https://golang.org/cl/129059 this code was factored out to
setToolFlags. The codepath of `go build` was updated to call
setToolFlags appropriatley, but the codepath of `go test -c` wasn't,
resulting in gcflags/ldflags being applied inconsistently when building
tests.

This commit changes TestPackagesFor to call setToolFlags on the package
objects it creates.

Fixes #28346

Change-Id: Idcbec0c989ee96ec066207184611f08818873e8d
Reviewed-on: https://go-review.googlesource.com/c/136275
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
(cherry picked from commit 374546d)
Reviewed-on: https://go-review.googlesource.com/c/156377
Run-TryBot: Alessandro Arzilli <alessandro.arzilli@gmail.com>
@julieqiu julieqiu modified the milestones: Go1.11.5, Go1.11.6 Jan 23, 2019
@golang golang locked and limited conversation to collaborators Jan 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases Debugging FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

10 participants