Skip to content
Merged
Show file tree
Hide file tree
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
88 changes: 88 additions & 0 deletions .github/actions/solaris/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Solaris
inputs:
configurationParameters:
default: ''
required: false
runExtraTests:
default: false
required: false
runs:
using: composite
steps:
- name: Solaris
uses: vmactions/solaris-vm@v1
with:
release: "11.4-gcc"
usesh: true
copyback: false
disable-cache: true
prepare: |
cd $GITHUB_WORKSPACE
pkg install bison developer/icu libzip oniguruma re2c

./buildconf -f
CC=gcc CXX=g++ \
CFLAGS="-Wno-char-subscripts" \
PATH=/usr/gnu/bin:/usr/bin \
PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig \
./configure \
--prefix=/usr/local \
--enable-debug \
--enable-werror \
--enable-option-checking=fatal \
--enable-fpm \
--without-pear \
--with-bz2 \
--with-jpeg \
--with-webp \
--with-freetype \
--enable-gd \
--enable-exif \
--with-zip \
--with-zlib \
--enable-soap \
--enable-xmlreader \
--with-xsl \
--with-libxml \
--enable-shmop \
--enable-pcntl \
--enable-mbstring \
--with-curl \
--enable-sockets \
--with-openssl \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-zend-test \
--enable-dl-test=shared \
--enable-intl \
--with-mhash \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
${{ inputs.configurationParameters }}

gmake -j2
mkdir /etc/php.d
gmake install > /dev/null
echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
echo opcache.preload_user=root >> /etc/php.d/opcache.ini
run: |
cd $GITHUB_WORKSPACE

export SKIP_IO_CAPTURE_TESTS=1
export CI_NO_IPV6=1
export STACK_LIMIT_DEFAULTS_CHECK=1
PATH=/usr/gnu/bin:/usr/bin \
sapi/cli/php run-tests.php \
-P -q -j1 \
-g FAIL,BORK,LEAK,XLEAK \
--no-progress \
--offline \
--show-diff \
--show-slow 1000 \
--set-timeout 120

if test "${{ inputs.runExtraTests }}" = "true"; then
sapi/cli/php run-extra-tests.php
fi
4 changes: 4 additions & 0 deletions .github/matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
$test_msan = in_array('CI: MSAN', $labels, true);
$test_opcache_variation = in_array('CI: Opcache Variation', $labels, true);
$test_pecl = in_array('CI: PECL', $labels, true);
$test_solaris = in_array('CI: Solaris', $labels, true);
$test_windows = in_array('CI: Windows', $labels, true);

$jobs = [];
Expand Down Expand Up @@ -132,6 +133,9 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
if (($all_jobs && $ref === 'master') || $test_pecl) {
$jobs['PECL'] = true;
}
if (version_compare($php_version, '8.6', '>=') && ($all_jobs || $test_solaris)) {
$jobs['SOLARIS'] = true;
}
if ($all_jobs || !$no_jobs || $test_windows) {
$jobs['WINDOWS']['matrix'] = $all_variations
? ['include' => [
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,21 @@ jobs:
configurationParameters: >-
--${{ matrix.zts && 'enable' || 'disable' }}-zts
runExtraTests: true
SOLARIS:
if: ${{ fromJson(inputs.branch).jobs.SOLARIS }}
name: "SOLARIS"
runs-on: ubuntu-latest
timeout-minutes: 50
steps:
- name: git checkout
uses: actions/checkout@v5
with:
ref: ${{ fromJson(inputs.branch).ref }}
- name: Solaris
uses: ./.github/actions/solaris
with:
configurationParameters: --disable-zts
runExtraTests: true
BENCHMARKING:
name: BENCHMARKING
if: ${{ fromJson(inputs.branch).jobs.BENCHMARKING }}
Expand Down
4 changes: 3 additions & 1 deletion Zend/tests/stack_limit/stack_limit_010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ $expectedMaxSize = match(php_uname('s')) {
'true' => 16*1024*1024, // https://github.com/actions/runner-images/pull/3328
default => 8*1024*1024,
},
'SunOS' => 10 * 1024 * 1024,
'SunOS' => preg_match('/(omnios|illumos|smartos|oi-|openindiana|joyent)/i', php_uname('v'))
? 10 * 1024 * 1024
: 8 * 1024 * 1024,
'Windows NT' => 67108864 - 4*4096, // Set by sapi/cli/config.w32
};

Expand Down
6 changes: 6 additions & 0 deletions ext/calendar/tests/unixtojd.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
--TEST--
unixtojd()
--SKIPIF--
<?php
if (PHP_OS_FAMILY === 'Solaris') {
die("skip Solaris localtime() produces different Julian day");
}
?>
--EXTENSIONS--
calendar
--ENV--
Expand Down
4 changes: 1 addition & 3 deletions ext/com_dotnet/com_com.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,7 @@ PHP_FUNCTION(com_create_guid)
GUID retval;
OLECHAR *guid_string;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

php_com_initialize();
if (CoCreateGuid(&retval) == S_OK && StringFromCLSID(&retval, &guid_string) == S_OK) {
Expand Down
12 changes: 3 additions & 9 deletions ext/com_dotnet/com_persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@ CPH_METHOD(GetCurFileName)
OLECHAR *olename = NULL;
CPH_FETCH();

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

CPH_NO_OBJ();

Expand Down Expand Up @@ -457,9 +455,7 @@ CPH_METHOD(GetMaxStreamSize)
ULARGE_INTEGER size;
CPH_FETCH();

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

CPH_NO_OBJ();

Expand Down Expand Up @@ -491,9 +487,7 @@ CPH_METHOD(InitNew)
HRESULT res;
CPH_FETCH();

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

CPH_NO_OBJ();

Expand Down
6 changes: 6 additions & 0 deletions ext/ctype/tests/bug25745.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Bug #25745 (ctype functions fail with non-ascii characters)
--EXTENSIONS--
ctype
--SKIPIF--
<?php
if (PHP_OS_FAMILY === 'Solaris') {
die("skip not valid fo Solaris");
}
?>
--INI--
error_reporting=E_ALL&~E_DEPRECATED
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion ext/date/tests/bug33532.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ error_reporting=2047
date.timezone=UTC
--SKIPIF--
<?php
if(PHP_OS == 'Darwin' || defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip strftime uses system TZ on Darwin and Windows");
if(PHP_OS == 'Darwin' || PHP_OS_FAMILY === 'Solaris' || defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip strftime uses system TZ on Darwin, Solaris and Windows");
if (!@strftime('%Z')) die('skip strftime does not support %Z');
?>
--FILE--
Expand Down
3 changes: 3 additions & 0 deletions ext/date/tests/gmstrftime_variation16.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Test gmstrftime() function : usage variation - Checking time related formats whi
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
die("skip Test is not valid for Windows");
}
if (PHP_OS_FAMILY === 'Solaris') {
die("skip Solaris uses ' 8:08:08 AM' for %r (time format differs)");
}
?>
--FILE--
<?php
Expand Down
3 changes: 3 additions & 0 deletions ext/date/tests/strftime_variation16.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Test strftime() function : usage variation - Checking time related formats which
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
die("skip Test is not valid for Windows");
}
if (PHP_OS_FAMILY === 'Solaris') {
die("skip Solaris uses ' 8:08:08 AM' for %r (time format differs)");
}
?>
--FILE--
<?php
Expand Down
4 changes: 1 addition & 3 deletions ext/dba/dba.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,9 +1301,7 @@ PHP_FUNCTION(dba_handlers)
/* {{{ List opened databases */
PHP_FUNCTION(dba_list)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);

Expand Down
12 changes: 3 additions & 9 deletions ext/dom/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ PHP_METHOD(DOMDocument, createDocumentFragment)
dom_object *intern;

id = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

Expand Down Expand Up @@ -1251,9 +1249,7 @@ PHP_METHOD(DOMDocument, normalizeDocument)
dom_object *intern;

id = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

Expand Down Expand Up @@ -1818,9 +1814,7 @@ PHP_METHOD(DOMDocument, validate)
xmlValidCtxt *cvp;

id = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

Expand Down
4 changes: 1 addition & 3 deletions ext/dom/documentfragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ PHP_METHOD(DOMDocumentFragment, __construct)
xmlNodePtr nodep = NULL, oldnode = NULL;
dom_object *intern;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

nodep = xmlNewDocFragment(NULL);

Expand Down
4 changes: 1 addition & 3 deletions ext/dom/element.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,9 +1477,7 @@ PHP_METHOD(DOMElement, remove)
{
dom_object *intern;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

DOM_GET_THIS_INTERN(intern);

Expand Down
4 changes: 1 addition & 3 deletions ext/enchant/enchant.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ PHP_FUNCTION(enchant_broker_init)
enchant_broker *broker;
EnchantBroker *pbroker;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

pbroker = enchant_broker_init();
if (pbroker) {
Expand Down
6 changes: 6 additions & 0 deletions ext/fileinfo/tests/finfo_upstream.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Fileinfo run upstream tests
--EXTENSIONS--
fileinfo
--SKIPIF--
<?php
if (PHP_OS_FAMILY === 'Solaris') {
die("skip timezone-dependent libmagic output differs on Solaris");
}
?>
--ENV--
TZ=UTC
--FILE--
Expand Down
4 changes: 1 addition & 3 deletions ext/filter/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,7 @@ PHP_FUNCTION(filter_list)
{
int size = sizeof(filter_list) / sizeof(filter_list_entry);

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
for (int i = 0; i < size; ++i) {
Expand Down
16 changes: 4 additions & 12 deletions ext/hash/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,7 @@ PHP_FUNCTION(hash_algos)
{
zend_string *str;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
ZEND_HASH_MAP_FOREACH_STR_KEY(&php_hash_hashtable, str) {
Expand All @@ -875,9 +873,7 @@ PHP_FUNCTION(hash_hmac_algos)
zend_string *str;
const php_hash_ops *ops;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);
ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&php_hash_hashtable, str, ops) {
Expand Down Expand Up @@ -1260,9 +1256,7 @@ PHP_FUNCTION(mhash_get_hash_name)
/* {{{ Gets the number of available hashes */
PHP_FUNCTION(mhash_count)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();
RETURN_LONG(MHASH_NUM_ALGOS - 1);
}
/* }}} */
Expand Down Expand Up @@ -1463,9 +1457,7 @@ PHP_METHOD(HashContext, __serialize)
zend_long magic = 0;
zval tmp;

if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
ZEND_PARSE_PARAMETERS_NONE();

array_init(return_value);

Expand Down
3 changes: 3 additions & 0 deletions ext/iconv/tests/bug37773.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ if ($test === false) {
die("skip UTF-8 is not supported?");
}

if (PHP_OS_FAMILY === 'Solaris') {
die("skip Solaris iconv behaves differently");
}
?>
--FILE--
<?php
Expand Down
Loading