Edit report at https://bugs.php.net/bug.php?id=59804&edit=1
ID: 59804 Updated by: oh...@php.net Reported by: mike at digitalstruct dot com Summary: Failed Tests due to new databases & changes in the timeZone.c api -Status: Open +Status: Closed Type: Bug Package: geoip Operating System: Ubuntu 10.10 PHP Version: 5.3.6 -Assigned To: +Assigned To: ohill Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Except #14, which I will have to change completely. Previous Comments: ------------------------------------------------------------------------ [2011-06-06 10:54:11] mike at digitalstruct dot com Well; the library changed for timeZone.c for the values in test 014. I can DL some older versions of the library and run some tests against those. In tests 008 and 011 those are values that are now never going to be utilized. I could update it based on the version of the GeoIP library for the tests to function correctly for older editions. If you look at the GeoIP.h header for the library it states: GEOIP_CITYCONFIDENCEDIST_ISP_ORG_EDITION = 19, /* unsued, but gaps are not allowed */ GEOIP_CCM_COUNTRY_EDITION =20, /* unsued, but gaps are not allowed */ which is probably the safest directory as they are the only ones that are not looking for a file in any location. The largest issue I see here is that the tests fail on the newer versions of the library which are now becoming standard in most of the distributions. ------------------------------------------------------------------------ [2011-06-06 10:45:38] oh...@php.net Your patch works, but will fail with old library installed. If some values have changed in the lib, perhaps we should not use those tests at all. ------------------------------------------------------------------------ [2011-06-06 10:33:41] mike at digitalstruct dot com Description: ------------ The latest GeoIP contains many new files; by changing the tests for 2 of the files it fixes 2 tests. There is also a change in how the timeZone.c does "CA" which failed another test. I have updated the tests to pass for the current SVN. Reproduce code: --------------- Patch file: http://blog.digitalstruct.com/patches/geoip-svn-tests.patch.txt Expected result: ---------------- Tests pass. Actual result: -------------- ============================================================ ========= TEST RESULT SUMMARY ------------------------------------------------------------ --------- Exts skipped : 0 Exts tested : 45 ------------------------------------------------------------ --------- Number of tests : 15 15 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 3 ( 20.0%) ( 20.0%) Expected fail : 0 ( 0.0%) ( 0.0%) Tests passed : 12 ( 80.0%) ( 80.0%) ------------------------------------------------------------ --------- Time taken : 0 seconds ============================================================ ========= ============================================================ ========= FAILED TEST SUMMARY ------------------------------------------------------------ --------- Calling geoip_db_filename() with a non-existant database type within bound. [tests/008.phpt] Calling geoip_database_info() with a non-existant database type within bound. [tests/011.phpt] Checking timezone info with (some) empty fields [tests/014.phpt] ============================================================ ========= ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=59804&edit=1