Repository navigation
Conversation
devnexen
reviewed
Oct 18, 2026
| var_dump(session_write_close()); | ||
|
|
||
| $fp = fopen($file, 'r'); | ||
| $fp = fopen($file, 'r+'); |
Member
There was a problem hiding this comment.
but then this test will always "succeed" on solaris, flock is emulated on solaris and is in the same process as session_write_close. Probably best to skip solaris instead.
Contributor
Author
There was a problem hiding this comment.
But it's not the point of the test. It's testing ext/session, not the fopen or flock. Those handlers here are for manipulating session file.
Member
There was a problem hiding this comment.
can you make rerun the CI for solaris ? it was skipped
jorgsowa
force-pushed
the
fix-session-flock-test-solaris
branch
from
October 18, 2026 18:32
069ed34 to
9882ddb
Compare
Exclusive flock() requires a writable descriptor on Solaris.
jorgsowa
force-pushed
the
fix-session-flock-test-solaris
branch
from
October 18, 2026 19:55
9882ddb to
298d857
Compare
Contributor
Author
|
The fixed test doesn't fail anymore. There are still two failures related to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test checks the session lock with
flock($fp, LOCK_EX | LOCK_NB)on a file opened withfopen($file, 'r'). On platforms withoutflock(), such as Solaris, PHP falls back tofcntl()locks.fcntl()refuses an exclusive lock on a read-only file, so the check returns false even though the lock was released. Itsflock()goes through thefcntl()wrapper inext/standard/flock_compat.c, which is why the test fails.Should fix Solaris issue in nigthly: https://github.com/php/php-src/actions/runs/38990675359/job/117272412935