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

x/sys/windows: go test ./... failed on windows #35246

Open
caixw opened this issue Oct 30, 2019 · 0 comments
Open

x/sys/windows: go test ./... failed on windows #35246

caixw opened this issue Oct 30, 2019 · 0 comments

Comments

@caixw
Copy link

@caixw caixw commented Oct 30, 2019

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

$ go version
go version go1.12 windows/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\xx\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\xx\go
set GOPROXY=https://goproxy.io
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map==C:\Users\ xx\AppData\Local\Temp\go-build199807830=/tmp/go-build -gno-record-gcc-switches

What did you do?

file.go

import "golang.org/x/sys/windows"

func Foo(v ...interface{}) (err error) {
	var info windows.ConsoleScreenBufferInfo
	return windows.GetConsoleScreenBufferInfo(windows.Stdout, &info)
}

file_test.go

import "testing"

func TestFoo(t *testing.T) {
	if err := Foo("test"); err != nil {
		t.Error(err)
	}
}

go test:

PASS
ok      github.com/issue9/term  0.386s

go test ./... or go test .:

--- FAIL: TestFoo (0.00s)
    file_test.go:11: The handle is invalid.
FAIL
FAIL    github.com/issue9/term  0.380s

What did you expect to see?

What did you see instead?

@caixw caixw changed the title go test ./... faild on windows go test ./... failed on windows Oct 30, 2019
@agnivade agnivade changed the title go test ./... failed on windows x/sys/windows: go test ./... failed on windows Oct 30, 2019
@gopherbot gopherbot added this to the Unreleased milestone Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.