Skip to content

testing: refactoring leads to deadlocks #64402

Description

@lfolger

Go version

tip

Reproducibility

  • Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

linux/amd64

What did you do?

The refactoring of the testing package in https://go.dev/cl/506755 leads to deadlocks.

One example that triggers this is:

func TestTesting(t *testing.T) { // <=== this is the outer t
    t.Run("outer", func(*testing.T) {
        t.Run("inner", func(t *testing.zT) { // <=== This is using the outer t
            t.Log("Hello World!")
        })
    })
}

In our Google internal testing we discovered other cases but I don't yet know a minimal reproducer that I can share here. I'll follow up separately.

What did you expect to see?

I expected the test to complete successfully.

What did you see instead?

The tests deadlocks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions