Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: failures in TestScript/test_chatty_parallel_success_sleepy due to unexpected output ordering #51221

Closed
bcmills opened this issue Feb 16, 2022 · 3 comments
Labels
FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Feb 16, 2022

greplogs --dashboard -md -l -e 'FAIL: TestScript/test_chatty_parallel_success_sleepy .*(?:\n .*)*--- PASS: TestSlow .*\n\s*(?:--- PASS: TestFast|=== CONT TestFast)'

2022-02-15T22:28:43-d199cef/windows-arm64-10
2021-12-23T20:03:38-b357b05/openbsd-386-70-n1

The test is inherently somewhat racy, although I'm a bit surprised it's that sensitive to output ordering.

I think it can be made more robust with some runtime shenanigans. 🤔

@bcmills bcmills self-assigned this Feb 16, 2022
@bcmills bcmills added GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Feb 16, 2022
@bcmills bcmills added this to the Backlog milestone Feb 16, 2022
@gopherbot
Copy link

Change https://go.dev/cl/386154 mentions this issue: cmd/go: remove arbitrary sleep in TestScript/test_chatty_parallel_success_sleepy

@bcmills bcmills modified the milestones: Backlog, Go1.19 Feb 17, 2022
@bcmills
Copy link
Contributor Author

bcmills commented Mar 31, 2022

Still not quite right.

2022-03-30T19:14:04-1ac1658/linux-386-longtest:

--- FAIL: TestScript (0.01s)
    --- FAIL: TestScript/test_chatty_parallel_success_run (1.14s)
        script_test.go:260: 
            # Run parallel chatty tests. Assert on CONT lines. This test makes sure that
            # multiple parallel outputs have the appropriate CONT lines between them. (1.140s)
            > go test -parallel 3 chatty_parallel -v
            [stdout]
            === RUN   TestInterruptor
            === PAUSE TestInterruptor
            === RUN   TestLog
            === PAUSE TestLog
            === CONT  TestInterruptor
            === CONT  TestLog
                chatty_parallel_test.go:25: this is the first TestLog log
            === RUN   TestInterruptor/interruption
            === CONT  TestLog
                chatty_parallel_test.go:28: this is the second TestLog log
            --- PASS: TestInterruptor (0.00s)
                --- PASS: TestInterruptor/interruption (0.00s)
            --- PASS: TestLog (0.00s)
            PASS
            ok  	chatty_parallel	0.026s
            > stdout '=== RUN   TestInterruptor/interruption\n=== CONT  TestLog\n    chatty_parallel_test.go:28: this is the second TestLog log\n--- PASS: TestLog \([0-9.]{4}s\)'
            FAIL: testdata/script/test_chatty_parallel_success_run.txt:5: no match for `(?m)=== RUN   TestInterruptor/interruption\n=== CONT  TestLog\n    chatty_parallel_test.go:28: this is the second TestLog log\n--- PASS: TestLog \([0-9.]{4}s\)` found in stdout
            
FAIL
FAIL	cmd/go

@bcmills bcmills reopened this Mar 31, 2022
@gopherbot
Copy link

Change https://go.dev/cl/397194 mentions this issue: cmd/go: allow either test to complete first in TestScript/test_chatty_parallel_success_run

@rsc rsc unassigned bcmills Jun 22, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

2 participants