New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix test when session extension is shared #9643
Conversation
Hmm, this looks somewhat hackish to me. Can't we just detect the |
Thanks, will fix extension_dir as it could be inherited But I see no way to get access to list of dependencies for test |
Since these should already be loaded, you could use |
When extension is build as shared then testing fpm configuration gets no extensions from EXTENSIONS section
148a173
to
d1a8988
Compare
@cmb69 There's |
Check via |
Ah, that's not the same process, the test starts new fpm process and missed to provide proper config to it
|
Using this as patch for 8.1 and 8.2 in Alpinelinux hope to get it in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be done differently. We could for example introduce a new environment variable and update CMD if there are set in a similar way like TEST_FPM_RUN_AS_ROOT
. It should be enough to have it for extension dir (e.g. TEST_FPM_EXTENSION_DIR
) and then have new parameter for required extension. If extension dir is set, it would be then provided as a list of additional parameters.
@@ -24,7 +24,7 @@ echo str_repeat('asdfghjkl', 150000) . "\n"; | |||
EOT; | |||
|
|||
$tester = new FPM\Tester($cfg, $code); | |||
$tester->start(); | |||
$tester->start(['-dextension=session']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This produces warning if the session is statically compiled.
@@ -392,7 +392,7 @@ class Tester | |||
$configFile = $this->createConfig(); | |||
$desc = $this->outDesc ? [] : [1 => array('pipe', 'w'), 2 => array('redirect', 1)]; | |||
|
|||
$cmd = [self::findExecutable(), '-F', '-y', $configFile]; | |||
$cmd = [self::findExecutable(), '-F', '-y', $configFile, '-dextension_dir=modules']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just specific to your setup where your extension dir is in modules so it cannot be applied in general. For example it produces warning in my local setup as I use some shared extensions that are not obviously in this directory.
Closing in favour of #9854 |
When extension is build as shared then testing fpm configuration gets no extensions from EXTENSIONS section
Actual order in which extensions are loaded is defined by distro-builders (often via numeric prefix 00_ 10_) and I see no good "grepable" way to figure order from .m4 and .w32 files (they need clean-up) only few hard dependencies are found using
ZEND_MOD_REQUIRED
(will provide PR later)Ref #9523 (comment)