|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44985 "bindec_basic.phpt" from "make test" depends on precision
Submitted: 2008-05-13 21:25 UTC Modified: 2008-07-23 14:16 UTC
From: twm at twmacinta dot com Assigned:
Status: Closed Package: Math related
PHP Version: 5.2.6 OS: Red Hat Enterprise Linux ES 3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: twm at twmacinta dot com
New email:
PHP Version: OS:


 [2008-05-13 21:25 UTC] twm at twmacinta dot com
After building PHP 5.2.6 on RHEL3, I ran "make test" to test the new build, and one of the tests that failed was "bindec_basic.phpt".  I inspected the test's output, compared it to what was expected, and came up with a potential fix for it based on similar problems from other tests which have since been fixed.

The problem appears to be that the expected output of the test is based on a "precision" configuration setting of 14, but my build is using ""php.ini-dist", which has a setting of 12.  This looks like it is the same problem that occurred with the "make test" script "ext/json/tests/bug41567.phpt", which was fixed in revision "".  The fix was simply to specify the precision in an INI section.  When I apply this same fix to "bindec_basic.phpt", the test then passes.  Here's what I added:


This is also the same problem (just in a different file) as bug #44920, which I also reported and which has since been fixed in the suggested manner:

Reproduce code:
1) Copy "php.ini-dist", which comes with PHP, to "/etc/php.ini"

2) Run the test that comes with PHP: "ext/standard/tests/math/bindec_basic.phpt"

Expected result:
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Tests passed    :    1 (100.0%) (100.0%)

Actual result:
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (100.0%) (100.0%)
Tests passed    :    0 (  0.0%) (  0.0%)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-23 14:16 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 09:01:33 2024 UTC