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: TestRootConsistency* and TestRootRaceRenameDir fail on Plan 9 after CL 627475 #70484

Closed millerresearch closed 7 hours ago

millerresearch commented 19 hours ago

Go version

gotip

Output of go env in your module/workspace:

n/a

What did you do?

LUCI tests running on Plan 9 builders.

What did you see happen?

Examples from log on plan9-arm builder:

--- FAIL: TestRootConsistencyCreate/dir_slash (0.05s)
    root_test.go:814: with root:    err='.../TestRootConsistencyCreatedir_slash2266991326/001/ROOT/target/' create without DMDIR
    root_test.go:815: without root: err='.../TestRootConsistencyCreatedir_slash2266991326/002/ROOT/target/' create without DMDIR
    root_test.go:816: want consistent results, got mismatch
--- FAIL: TestRootConsistencyCreate/dir_slash_dot (0.05s)
    root_test.go:814: with root:    err='.../001/ROOT/target/.' create without DMDIR
    root_test.go:815: without root: err='.../002/ROOT/target/.' create without DMDIR
    root_test.go:816: want consistent results, got mismatch
--- FAIL: TestRootConsistencyCreate/directory_in_path_missing (0.04s)
    root_test.go:814: with root:    err='.../001/ROOT/dir' does not exist
    root_test.go:815: without root: err='.../002/ROOT/dir' does not exist
    root_test.go:816: want consistent results, got mismatch

Also:

--- FAIL: TestRootRaceRenameDir (0.09s)
    root_test.go:1149: rename /tmp/TestRootRaceRenameDir1031700980/001/base/a /tmp/TestRootRaceRenameDir1031700980/001/b: invalid argument

What did you expect to see?

The consistency tests are failing because Plan 9 includes a path name in its error strings, so the error returned from invalid operations using different path names will not be the same.

The rename test is failing because Plan 9 only supports renaming files when old and new names are in the same directory.

Note that os tests are also failing in NetBSD after CL 627475, for different reasons.

gabyhelp commented 19 hours ago

Related Issues

Related Code Changes

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

ianlancetaylor commented 8 hours ago

CC @neild

gopherbot commented 8 hours ago

Change https://go.dev/cl/630776 mentions this issue: os: fix failing TestRoot* tests on plan9

gopherbot commented 7 hours ago

Change https://go.dev/cl/630216 mentions this issue: os: fix Root tests on Plan9