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/dist/test: -race flag not supported for linux/s390x although cmd/internal/sys/supported begs to differ #53981

Closed
haubenr opened this issue Jul 21, 2022 · 2 comments
Labels
arch-s390x Issues solely affecting the s390x architecture. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Linux RaceDetector
Milestone

Comments

@haubenr
Copy link

haubenr commented Jul 21, 2022

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

$ go version
go version go1.18.4 linux/s390x

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="s390x"
GOBIN=""
GOCACHE="/home/haubenr/.cache/go-build"
GOENV="/home/haubenr/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="s390x"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/haubenr/Work/Development/workspaces/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/haubenr/Work/Development/workspaces/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_s390x"
GOVCS=""
GOVERSION="go1.18.4"
GCCGO="gccgo"
AR="ar"
CC="s390x-linux-gnu-gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
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 -march=z196 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2211726378=/tmp/go-build -gno-record-gcc-switches"

What did you do?

The knative.dev go-based e2e testcases are being run with the go test -race ... command. While this works fine for the main x86_64 platform, for linux/s390x the command always reports -race is not supported on linux/s390x.

What did you expect to see?

Race detection is enabled for linux/s390x in the go codebase, but for some reason the implementations in cmd/internal/sys/supported.go and cmd/dist/test.go have diverged although the comments in both files suggest otherwise. This should be fixed, with cmd/dist/test.goexhibiting the same behaviour as the main implementation in cmd/internal/sys/supported.go.

What did you see instead?

Race detection does not work when calling go test -race whereas the actual implementation in the go codebase suggests otherwise.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/418914 mentions this issue: cmd/dist: enable race detector test on S390x

@cherrymui
Copy link
Member

cherrymui commented Jul 21, 2022

Thanks for the report. Sent the CL above to make cmd/dist match.

However, you're seeing -race is not supported on linux/s390x because you're using Go 1.18.4, whereas the race detector support is added in Go 1.19, see https://tip.golang.org/doc/go1.19#runtime/race .

@dmitshur dmitshur added this to the Go1.19 milestone Jul 21, 2022
@dmitshur dmitshur added RaceDetector OS-Linux arch-s390x Issues solely affecting the s390x architecture. labels Jul 21, 2022
@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 1, 2022
jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
The support was added but the test was not enabled. Enable it.

Fixes golang#53981.

Change-Id: I81ea73ea4ebc1013c35cb70ae88b096e02497887
Reviewed-on: https://go-review.googlesource.com/c/go/+/418914
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-s390x Issues solely affecting the s390x architecture. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Linux RaceDetector
Projects
None yet
Development

No branches or pull requests

4 participants