From:             twm at twmacinta dot com
Operating system: Red Hat Enterprise Linux ES 3
PHP version:      5.2.6
PHP Bug Type:     Unknown/Other Function
Bug description:  "vsprintf_variation8.phpt" from "make test" depends on 
precision

Description:
------------
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 "vsprintf_variation8.phpt".  I
inspected the test's output, compared it to what was expected, tracked down
the problem, and came up with a potential fix for it.

The problem appears to be that the expected output of the test is based on
the default "precision" configuration setting of 14, but my "php.ini" file
has it set to 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 "1.1.2.5".  The fix was simply to specify the precision in an
INI section.  When I apply this same fix to "vsprintf_variation8.phpt", the
test then passes.  Here's what I added:

--INI--
precision=14

I had copied the file named "php.ini-dist" which came with the PHP source
distribution to "/etc/php.ini", without modification.  It sets the
precision to 12.

I looked at the CVS history for the test "vsprintf_variation8.phpt" and it
appears to be fixed in PHP 5.3 in the same way I suggested above.  I think
that fix just needs to be applied to PHP 5.2 as well.


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/strings/vsprintf_variation8.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%)


-- 
Edit bug report at http://bugs.php.net/?id=44920&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44920&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44920&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44920&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44920&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44920&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44920&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44920&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44920&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44920&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44920&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44920&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44920&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44920&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44920&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44920&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44920&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44920&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44920&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44920&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44920&r=mysqlcfg

Reply via email to