php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55479 ext/pcntl/tests failures
Submitted: 2011-08-22 17:03 UTC Modified: 2014-04-27 12:03 UTC
From: glen at delfi dot ee Assigned:
Status: Open Package: Testing related
PHP Version: 5.4.0alpha3 OS:
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: glen at delfi dot ee
New email:
PHP Version: OS:

 

 [2011-08-22 17:03 UTC] glen at delfi dot ee
Description:
------------
there are ext/pcntl/tests failures due it using $TEST_PHP_EXECUTABLE which uses 
installed php 
config, but tests should be self-contained and use config extensions from BUILT 
codebase.

for example if i have installed php 5.3 and i try to run tests on 5.4 i get 
errors:

+ /usr/bin/make -j16 test EXTENSION_DIR=modules 
PHP_TEST_SHARED_SYSTEM_EXTENSIONS= 
RUN_TESTS_SETTINGS=-q ext/pcntl/tests/pcntl_exec_2.phpt --show-out

Build complete.
Don't forget to run 'make test'.


=====================================================================
PHP         : /home/users/glen/rpm/BUILD.i686-linux/php-5.4.0alpha3/sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 5.4.0alpha3
ZEND_VERSION: 2.4.0
PHP_OS      : Linux - Linux carme-pld-i686 3.0.0_nogrsecurity-0.3 #1 SMP Wed Jul 
27 21:17:15 CEST 
2011 i686
INI actual  : /home/users/glen/rpm/BUILD.i686-linux/php-5.4.0alpha3/tmp-php.ini
More .INIs  :  
CWD         : /home/users/glen/rpm/BUILD.i686-linux/php-5.4.0alpha3
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
Running selected tests.
TEST 1/1 [ext/pcntl/tests/pcntl_exec_2.phpt]
========OUT========
ok
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/pcre.so' 
- 
/usr/lib/php/pcre.so: undefined symbol: php_addslashes_ex in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/spl.so' 
- 
/usr/lib/php/spl.so: undefined symbol: php_pcre_replace_impl in Unknown on line 
0
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib/php/session.so' - 
/usr/lib/php/session.so: undefined symbol: php_get_output_start_filename in 
Unknown on line 0
PHP Warning:  PHP Startup: bcmath: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
....




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-22 17:05 UTC] glen at delfi dot ee
proposed patch:

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/php/bug-test-pcntl-
55479.patch
 [2011-08-26 15:22 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2011-08-26 15:22 UTC] kalle@php.net
From the trace it looks like you are using some old dynamically linked libraries thats compiled to a different version that the one you are using (see the APINO).

Packages like PCRE and SPL should be statically compiled anyway, although I don't reckon we have any issues using dynamically loaded ones.
 [2011-08-27 14:37 UTC] glen at delfi dot ee
-Status: Feedback +Status: Open
 [2011-08-27 14:37 UTC] glen at delfi dot ee
err, i know all that

the bug is that "make test" is using modules from to-be-installed path, where 
could be installed other version of php

so the patch is to enforce currently built version of php config and modules of 
php-cli that is invoked from tests itself

"make test" itself already does the php invocation properly, but invoking 
$PHP_TEST_EXECUTABLE from tests should do the same.

i've included patch for two tests i saw failing. i would proceed in other exts 
if i see interest in that.

is it clear what i'm saying here? maybe just look at the patch as patch says 
more than i'm able to explain.
 [2011-08-27 14:42 UTC] glen at delfi dot ee
i.e to be independant of php version installed in system while running tests, the 
following args need to be told when invoking php cli inside each .phpt:

$args = array("-n", "-d$extension_dir", "-c$inipath", ...);

where $extension_dir is ./modules and $inipath ./php-temp.ini, without doing so 
it would read /usr/lib/php for $extension_dir and /etc/php/php.ini for $inipath
 [2011-09-08 09:58 UTC] bjori@php.net
That seems like a bad workaround which would need to be repeated in many places.
run-tests maybe could export an environment variable which contained proper 
execute command..?
 [2011-09-08 11:02 UTC] glen at delfi dot ee
i wouldn't call it workaround, but rather "changes needed to get tests run 
standalone, i.e independant what is installed in system", which is important to 
get tests run unaffected by environment details

i agree, that support from run-tests.php side would make tests simplier. would it 
be needed to document the interface somewhere?

should i try to make such patch?
 [2011-09-26 23:32 UTC] tyrael@php.net
-Package: PCNTL related +Package: Testing related
 [2012-11-24 11:10 UTC] pajoye@php.net
-Assigned To: +Assigned To: sixd
 [2012-11-25 23:16 UTC] sixd@php.net
-Assigned To: sixd +Assigned To:
 [2014-04-27 12:03 UTC] glen at delfi dot ee
so, you ask people to submit qa reports for testing, and then you don't even accept the patches!
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Sep 22 03:01:26 2019 UTC