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: all.bash test failure in the terminal test from commit 1fba10c999 #34791

Closed
siebenmann opened this issue Oct 9, 2019 · 4 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages) Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@siebenmann
Copy link

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

$ go version
go version devel +1fba10c999 Wed Oct 9 15:07:29 2019 +0000 linux/amd64

Does this issue reproduce with the latest release?

No.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/homes/hawklords/cks/.cache/go-build"
GOENV="/homes/hawklords/cks/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/homes/hawklords/cks/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/data/code/go-lang/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/data/code/go-lang/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/data/code/go-lang/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=/tmpfs/go-build183007954=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Starting with commit 1fba10c (which is to fix issue #29062), running all.bash in a terminal causes the TestIsTerminal test to fail:

$ ./all.bash
[...]

##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick
ok      runtime 9.289s

##### cmd/go terminal test
--- FAIL: TestIsTerminal (0.00s)
    terminal_test.go:34: stdout is not a terminal
    terminal_test.go:37: stderr is not a terminal
FAIL
exit status 1
FAIL    cmd/go/testdata/testterminal18153       0.001s
2019/10/09 11:54:08 Failed: exit status 1

Running all.bash in a context where it doesn't have a terminal (pty) available causes this test to be skipped, resulting in no failure, which may be why the builders aren't picking up on this test failure.

@bcmills
Copy link
Contributor

bcmills commented Oct 9, 2019

CC @mvdan

@bcmills bcmills added this to the Go1.14 milestone Oct 9, 2019
@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure. labels Oct 9, 2019
@bcmills
Copy link
Contributor

bcmills commented Oct 9, 2019

The failing test is a regression test for #18153, which aimed to guarantee that the test's FD 1 is, in fact, a terminal when cmd/go's stdout is a terminal.

@gopherbot
Copy link

Change https://golang.org/cl/200106 mentions this issue: Revert "cmd/go: fail if a test binary exits with no output"

@bcmills bcmills added the Soon This needs to be done soon. (regressions, serious bugs, outages) label Oct 9, 2019
@mvdan
Copy link
Member

mvdan commented Oct 10, 2019

The test in question simply locks in the behavior; I would hope that we don't actually have any real tests that require a terminal when running go test.

Having said this, my bad for not catching this test. In my defense, go test for me was failing until I managed to fix #33883.

@golang golang locked and limited conversation to collaborators Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages) Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants