Edit report at https://bugs.php.net/bug.php?id=63409&edit=1

 ID:                 63409
 Updated by:         fel...@php.net
 Reported by:        tianhonglouis at gmail dot com
 Summary:            php-dba function test fails on big-endian machine
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Testing related
 Operating System:   linux
 PHP Version:        5.4.8
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of felipe...@gmail.com
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=7e33b5d2fa89a6bf167fc4061dcf6aedab1cc6b8
Log: - Fixed bug #63409 (php-dba function test fails on big-endian machine) 
patch by: tianhonglouis at gmail dot com


Previous Comments:
------------------------------------------------------------------------
[2012-11-01 09:06:17] tianhonglouis at gmail dot com

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 this bug report at https://bugs.php.net/bug.php?id=63409&edit=1

Reply via email to