Closed
Description
CL 661595 added TestRootRemoveDot which fails on Plan 9:
=== RUN TestRootRemoveDot
root_test.go:1845: root.Remove(".") = <nil>, want error
root_test.go:1851: root.Remove(All)?(".") removed the root
--- FAIL: TestRootRemoveDot (0.01s)
@neild, what is the purpose of this test? It appears to be checking that file "." can't be removed, in the context of os.Root
where file dot means the directory opened by OpenRoot
(not the current working directory as one might normally expect).
I can't find anything in the package documentation for Root
that says dot can't be removed. On linux, it seems to be the case as a side effect of the implementation holding an open file descriptor for dot, but on Plan 9 there are no restrictions on deleting an open directory. So it seems to me that this test is checking for an operating system artefact, not checking for correct go behaviour.
CC @golang/plan9.