golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.21k stars 17.7k forks source link

os: TestOpenError fails on some plan9 builders #70440

Closed millerresearch closed 9 hours ago

millerresearch commented 2 days ago

Go version

gotip

Output of go env in your module/workspace:

AR='ar'
 CC='gcc'
 CGO_CFLAGS='-O2 -g'
 CGO_CPPFLAGS=''
 CGO_CXXFLAGS='-O2 -g'
 CGO_ENABLED='0'
 CGO_FFLAGS='-O2 -g'
 CGO_LDFLAGS='-O2 -g'
 CXX='g++'
 GCCGO='gccgo'
 GO111MODULE=''
 GO386='sse2'
 GOARCH='386'
 GOAUTH='netrc'
 GOBIN=''
 GOCACHE='/home/swarming/luci/386/.swarming/w/ir/x/w/gocache'
 GODEBUG=''
 GOENV='/home/swarming/luci/386/.config/go/env'
 GOEXE=''
 GOEXPERIMENT=''
 GOFLAGS=''
 GOGCCFLAGS='-fPIC -m32 -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/home/swarming/luci/386/.swarming/w/ir/x/t/go-build2873492059=/tmp/go-build -gno-record-gcc-switches'
 GOHOSTARCH='amd64'
 GOHOSTOS='linux'
 GOINSECURE=''
 GOMOD='/dev/null'
 GOMODCACHE='/home/swarming/luci/386/.swarming/w/ir/x/w/gopath/pkg/mod'
 GONOPROXY=''
 GONOSUMDB=''
 GOOS='plan9'
 GOPATH='/home/swarming/luci/386/.swarming/w/ir/x/w/gopath'
 GOPRIVATE=''
 GOPROXY='https://proxy.golang.org,direct'
 GOROOT='/home/swarming/luci/386/.swarming/w/ir/x/w/goroot'
 GOSUMDB='sum.golang.org'
 GOTELEMETRY='local'
 GOTELEMETRYDIR='/home/swarming/luci/386/.config/go/telemetry'
 GOTMPDIR=''
 GOTOOLCHAIN='local'
 GOTOOLDIR='/home/swarming/luci/386/.swarming/w/ir/x/w/goroot/pkg/tool/linux_amd64'
 GOVCS=''
 GOVERSION='devel 400433af3660905ecaceaf19ddad3e6c24b141df'
 GOWORK=''
 PKG_CONFIG='pkg-config'

What did you do?

LUCI tests, for example ci/gotip-plan9-386

What did you see happen?

Example log:

=== RUN   TestOpenError
=== PAUSE TestOpenError
=== CONT  TestOpenError
    os_test.go:1830: Open("is-a-dir", 1) = _, "'/tmp/TestOpenError845272514/001/is-a-dir' permission denied"; want suffix "is a directory"
--- FAIL: TestOpenError (0.00s)

What did you expect to see?

Different Plan 9 file servers return different error strings (some arguably incorrect) when a process attempts to write to a directory. TestOpenError changed in CL 620157 to use a directory in /tmp instead of using the root file system. This may fail on Plan 9, depending on which file server is used to provide `/tmp'. The test already has a special case for Plan 9's idiosyncratic error messages, but needs to allow for more possibilities.

gabyhelp commented 2 days ago

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

gopherbot commented 2 days ago

Change https://go.dev/cl/629635 mentions this issue: os: allow for variant plan9 error messages in TestOpenError