From:             tianhonglouis at gmail dot com
Operating system: linux
PHP version:      5.4.8
Package:          Testing related
Bug Type:         Bug
Bug description:php-dba function test fails on big-endian machine

Description:
------------
For ext/dba/tests/bug38698.phpt, if running the testcase on big-endian
machine 
like ppc, it will fail. The main root cause is the function pack('i', 129),
if 
add the format character "i", it's machine dependent size and byte order.
Big 
endian and liitle endian will output the different string value. According
to the 
string value, dba_insert() will insert the different position of the db,
finally 
cause the different md5 value. 

Test script:
---------------
php run-tests.php ext/dba/tests/bug38698.phpt

Expected result:
----------------
Running selected tests.
PASS Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and
cdb 
can't read valid db) [ext/dba/tests/bug38698.phpt] 
=====================================================================
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    1 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken      :    0 seconds

Actual result:
--------------
Running selected tests.
FAIL Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and
cdb 
can't read valid db) [ext/dba/tests/bug38698.phpt] 
=====================================================================
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (100.0%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    0 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb
can't 
read valid db) [ext/dba/tests/bug38698.phpt]


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


-- 
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to