Flaky hrtime.phpt test
Open
Beginner friendly
Nobody has claimed this yet.
Bug
Category: Tests
Status: Verified
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
I've never seen this happening, but earlier today I had a number of failures on the ext/standard/tests/hrtime/hrtime.phpt test while doing test runs for the 8.6.0alpha1 packaging.
TEST 1/1 [ext/standard/tests/hrtime/hrtime.phpt]
========DIFF========
001- OK, %f
001+ FAIL, 0.050114826176838
========DONE========
FAIL Test hrtime() aligns with microtime() [ext/standard/tests/hrtime/hrtime.phpt]
Perhaps it could be worth increasing the 0.05 hard limit that is set in the test?
PHP Version
master
Operating System
Ubuntu 26.04
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ext/standard/tests/hrtime/hrtime.phpt and inspect the 0.05 hard limit used by the hrtime() versus microtime() check. Run this test repeatedly in the reported packaging environment; done means the timing comparison remains meaningful without intermittent failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100