-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version)?
1.6.2
(installed via go1.6.2.linux-amd64.tar.gz at https://golang.org/dl/) - What operating system and processor architecture are you using (
go env)?
The OS is Fedora 23 (Workstation Edition). Thego envoutput doesn't quite capture that fully:
GOARCH="amd64"
GOBIN="/usr/src/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr/src/go"
GORACE=""
GOROOT="/usr/src/golang-1.6"
GOTOOLDIR="/usr/src/golang-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
- What did you do?
go code https://play.golang.org/p/6GR6cTzVcM
go test case for that code https://play.golang.org/p/ZEJ2iNJMPV
Run a simple test case that fails, outputting a t.Fatal(err).
- What did you expect to see?
https://golang.org/pkg/testing/#T indicates that testing logs are accumulated and output to stderr so I expect the t.Fatal() output report to be on stderr.
- What did you see instead?
The report output is on stdout.
It seems like something as trivial as tpepper@c60fccd (which is on top of tip's changes to allow subtests) could bring the report output in line with the documentation. But as noted in that tentative commit message, this might break users who have coded to the behavior without reporting the inconsistency. Perhaps the answer is to change the documentation, except the enabling the distinction between stdout and stderr is actually useful.