Go version
go version go1.22.0 windows/amd64
Output of go env in your module/workspace:
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\kamal\AppData\Local\go-build
set GOENV=C:\Users\kamal\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\kamal\go\pkg\mod
set GONOPROXY=github.com/kamalshkeir/kamal
set GONOSUMDB=github.com/kamalshkeir/kamal
set GOOS=windows
set GOPATH=C:\Users\kamal\go
set GOPRIVATE=github.com/kamalshkeir/kamal
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.0
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\kamal\Desktop\testmaps\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\kamal\AppData\Local\Temp\go-build4174937017=/tmp/go-build -gno-record-gcc-switches
What did you do?
import (
"fmt"
"testing"
)
func makeRace() {
var x int
c := make(chan bool)
go func() {
x = 1
c <- true
}()
fmt.Println(x)
<-c
}
func TestFoo(t *testing.T) {
makeRace()
}
when running go test ./... -v -race :
PS C:\Users\kamal\Desktop\testmaps> go test ./... -v -race
? testmaps [no test files]
exit status 0xc0000139
FAIL testmaps/cache 0.172s
FAIL
What did you see happen?
also i notice that i have the same exit error even if there is no race at all, just adding the -race flag break everything
What did you expect to see?
since i use -v, i should see logs of where the race happened
Go version
go version go1.22.0 windows/amd64
Output of
go envin your module/workspace:What did you do?
when running
go test ./... -v -race:What did you see happen?
also i notice that i have the same exit error even if there is no race at all, just adding the -race flag break everything
What did you expect to see?
since i use -v, i should see logs of where the race happened