Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/session/tests/session_write_close_encode_failure.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $file = $dir . '/sess_' . session_id();
$_SESSION['bad|key'] = 'value';
var_dump(session_write_close());

$fp = fopen($file, 'r');
$fp = fopen($file, 'r+');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make rerun the CI for solaris ? it was skipped

var_dump(flock($fp, LOCK_EX | LOCK_NB));
fclose($fp);

Expand All @@ -34,7 +34,7 @@ try {
echo $e::class, ": ", $e->getMessage(), PHP_EOL;
}

$fp = fopen($file, 'r');
$fp = fopen($file, 'r+');
var_dump(flock($fp, LOCK_EX | LOCK_NB));
fclose($fp);

Expand Down
Loading