Skip to content

text/template: TestLinkerGC uses a non-hermetic "go" command #39199

@bcmills

Description

@bcmills

What version of Go are you using (go version)?

$ go version
go version devel +567fe4650b Thu May 21 13:43:48 2020 -0400 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/bcmills/.cache/go-build"
GOENV="/usr/local/google/home/bcmills/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/bcmills/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/bcmills"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/google/home/bcmills/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/bcmills/go/pkg/tool/linux_amd64"
GCCGO="/usr/local/google/home/bcmills/bin/gccgo"
GOAMD64="alignedjumps"
AR="ar"
CC="gcc"
CXX="c++"
CGO_ENABLED="1"
GOMOD="/usr/local/google/home/bcmills/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build456911771=/tmp/go-build -gno-record-gcc-switches"

What did you do?

~/go/src$ ls ~/minbin
ar  as  cat  clang  diff  echo  env  gcc  ld  pwd  uname  whoami

~/go/src$ PATH=~/minbin ../bin/go test text/template
--- FAIL: TestLinkerGC (0.00s)
    link_test.go:55: go build: exec: "go": executable file not found in $PATH,
FAIL
FAIL    text/template   0.193s
FAIL

What did you expect to see?

Tests run using the go command from the same GOROOT used to build the text/template test.

What did you see instead?

A test failure due to the go command not being present in PATH.

Marking as release-blocker since this test is new in 1.15.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.okay-after-beta1Used by release team to mark a release-blocker issue as okay to resolve either before or after beta1release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions