php / php/php-src

Flaky hrtime.phpt test

Open Beginner friendly
#22,508 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.