Skip to content

os: new test TestRootRemoveDot fails on plan9 #73863

Closed
@millerresearch

Description

@millerresearch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.NeedsFixThe path to resolution is known, but the work has not been done.OS-Plan9

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions