Skip to content

testing: new T.TempDir doesn't work with subtests #38465

@bradfitz

Description

@bradfitz

Using TempDir with subtests with the unreleased testing.TB.TempDir (#35998) doesn't work, as ioutil.TempDir doesn't want a slash in its pattern:

=== RUN   TestLinkerGC/only_conn
    TestLinkerGC/only_conn: testing.go:819: TempDir: pattern contains path separator
=== RUN   TestLinkerGC/only_client
    TestLinkerGC/only_client: testing.go:819: TempDir: pattern contains path separator
=== RUN   TestLinkerGC/only_server
    TestLinkerGC/only_server: testing.go:819: TempDir: pattern contains path separator
--- FAIL: TestLinkerGC (0.00s)

Seems easy enough to fix... just mangle the test name a bit.

/cc @ianlancetaylor @bcmills

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions