x/sys/unix: TestTime is flaky #33200
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
In golang.org/x/sys/unix/syscall_linux_test.go, the
TestTime
function is flaky. It calls unix.Time and time.Now and compares them for strict equality.These values are only good to 1-second precision, but since the calls do not occur at exactly the same time, there is still a possibility that the latter call could refer to next second. The strict equality check does not account for this and so the test sporadically fails whenever you happen to hit that rollover between both function calls.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?It's an automated rebuild, so I can't get
go env
output, but it's running on ppc64le.What did you do?
Run tests for golang.org/x/sys.
What did you expect to see?
Tests pass.
What did you see instead?
Sporadic failures here with an off-by-one difference:
The text was updated successfully, but these errors were encountered: