-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
go/printer: TestFiles failures with running too slowly
#57591
Comments
Found new dashboard test flakes for:
2022-11-10 18:51 openbsd-mips64-jsing go@79d9b395 go/printer.TestFiles (log)
|
This is the regression test for #1628, and it uses an arbitrary 10-second timeout: @griesemer, is the arbitrary timeout still useful? I see that #1628 was fixing an exponential-time algorithm — would the regression test time out naturally without this artificial limit? |
(CC @mvdan as a secondary owner of |
It seems like the original test without the fix took over a minute, so it might not trigger default timeouts like 10m. I agree that the mechanism of using a 10s timeout isn't great, because a sufficiently busy or slow machine can still lead to timing flakes. Perhaps we could instead have the tests count the number of calls to Fprint. Before the fix, that number was exponential, so we should be able to pin down an expected number or range of Fprint calls per test case. That shouldn't cause flakes or change from machine to machine. It does require a tiny bit of extra bookkeeping, but full calls to Fprint shouldn't be too frequent thanks to the memoization. And the test would have to poke at the printer internals to get the resulting count, but I don't see a better way to tell if the printer is being exponential or not - without using timeouts. |
The usual way to detect an exponential function is to fit a curve to a lot of samples. But “a lot of samples” sounds expensive and nearly as prone to noise. 😅 |
Found new dashboard test flakes for:
2023-09-13 23:32 linux-s390x-ibm-race go@fccd0b9b go/printer.TestFiles (log)
|
Found new dashboard test flakes for:
2023-10-24 13:47 linux-s390x-ibm-race go@6f87db50 go/printer.TestFiles (log)
|
running too slowly
Found new dashboard test flakes for:
2023-11-07 21:13 linux-s390x-ibm-race go@9e90a15b go/printer.TestFiles (log)
|
Found new dashboard test flakes for:
2023-12-06 23:34 linux-s390x-ibm-race go@2b442575 go/printer.TestFiles (log)
|
Found new dashboard test flakes for:
2024-01-30 14:41 gotip-linux-ppc64le go@b89ad464 go/printer.TestFiles (log)
|
Issue created automatically to collect these failures.
Example (log):
— watchflakes
The text was updated successfully, but these errors were encountered: