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: flaky TestScript/test_regexps failure #36664

Closed
josharian opened this issue Jan 21, 2020 · 4 comments
Closed

cmd/go: flaky TestScript/test_regexps failure #36664

josharian opened this issue Jan 21, 2020 · 4 comments
Labels
Milestone

Comments

@josharian
Copy link
Contributor

@josharian josharian commented Jan 21, 2020

Noticed in a trybot run, sandwiched between a bunch of commits in which the test passed.

https://storage.googleapis.com/go-build-log/254cd30d/openbsd-amd64-64_892a8698.log

--- FAIL: TestScript (0.00s)
    --- FAIL: TestScript/test_regexps (1.68s)
        script_test.go:193: 
            # Test the following:
            #	TestX is run, twice (0.001s)
            #	TestX/Y is run, twice (0.001s)
            #	TestXX is run, twice (0.000s)
            #	TestZ is not run (0.000s)
            #	BenchmarkX is run but only with N=1, once (0.000s)
            #	BenchmarkXX is run but only with N=1, once (0.000s)
            #	BenchmarkX/Y is run in full, twice (0.001s)
            > stdout -count=2 '    BenchmarkX/Y: x_test.go:15: LOG: Y running N=1\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=100\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=10000\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=1000000\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=100000000\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=1000000000'
            FAIL: testdata/script/test_regexps.txt:29: have 1 matches for `(?m)    BenchmarkX/Y: x_test.go:15: LOG: Y running N=1\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=100\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=10000\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=1000000\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=100000000\n    BenchmarkX/Y: x_test.go:15: LOG: Y running N=1000000000`, want 2
            
FAIL

cc @bcmills

@josharian josharian added this to the Go1.15 milestone Jan 21, 2020
@josharian josharian added the Testing label Jan 21, 2020
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jan 21, 2020

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 21, 2020

Change https://golang.org/cl/215578 mentions this issue: cmd/go: make Script/test_regexps less flaky under load

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 21, 2020

Change https://golang.org/cl/215597 mentions this issue: cmd/stress: use an ellipsis when truncating output

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jan 21, 2020

This is the same underlying issue as #36074, transformed by the conversion to a test script in CL 213130.

@toothrot toothrot added the NeedsFix label Jan 21, 2020
gopherbot pushed a commit to golang/tools that referenced this issue Jan 22, 2020
While investigating golang/go#36664, the entire output of a failure
could get pretty long - past fifty lines of content. I was getting
confused as to why the output was being cut off.

I had to discard a number of theories (the test being buggy, my expected
output being wrong, etc) before I realised that something was truncating
the output for the sake of the reader.

Since that's what stress is doing, make it add an ellipsis character
too, to further hint to the user that the output is being truncated for
readability. Separate it with a newline to make it easier to notice.

Change-Id: Ie052c13bb48d6fd842d6054848161266d9ea17e6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/215597
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
@gopherbot gopherbot closed this in 8689ea6 Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.