-
Notifications
You must be signed in to change notification settings - Fork 350
[Fortran/gfortran] Disable flaky test random_init_2.f90 #153
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
Conversation
The random_init_2.f90 test is flaky and may fail sometimes, even when no Fortran/Flang changes are made: - https://lab.llvm.org/buildbot/#/builders/143/builds/1236 - https://lab.llvm.org/buildbot/#/builders/17/builds/2058 Looking at the test source, it seems there is no guarantee that 2 distinct random numbers will never collide. This is made worse by multiplying them by 1e6 and converting them to integer, which could make distinct but close enough single-precision floating-point numbers give the same result and fail the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this to get the buildbots going ...
Do you know why this was never triggered until just now? I have never seen this failure in any of my local testing, and none of the buildbots have complained about this in the past either.
Thanks for the review!
Actually, this test didn't start failing now. It's quite uncommon, but it fails sometimes. I suspect it doesn't happen often because most times the generated random numbers, converted to integers, are different. The failure may also go unnoticed, as it usually disappears in the next build. |
I see. Thanks for the clarification. There are other |
I've checked the
I haven't checked the other |
OK. Thanks for checking the other tests, Leandro. We might need to revisit the other Feel free to merge this whenever you see fit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work investigating Leandro, thanks!
(gonna go ahead and merge this myself) |
The random_init_2.f90 test is flaky and may fail sometimes, even
when no Fortran/Flang changes are made:
Looking at the test source, it seems there is no guarantee that 2
distinct random numbers will never collide. This is made worse by
multiplying them by 1e6 and converting them to integer, which could
make distinct but close enough single-precision floating-point
numbers give the same result and fail the test.