-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix Solaris tests and enable CI #20709
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| 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 | ||
| prepare: | | ||
| cd $GITHUB_WORKSPACE | ||
| pkg install bison developer/icu libzip oniguruma re2c | ||
|
|
||
| ./buildconf -f | ||
| CC=gcc CXX=g++ \ | ||
| PATH=/usr/gnu/bin:/usr/bin \ | ||
| PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig \ | ||
| ./configure \ | ||
| --prefix=/usr/local \ | ||
| --enable-debug \ | ||
| --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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as a follow-up PR, might be worth doing solaris only versions of tests related to time formats. |
||
| } | ||
| ?> | ||
| --FILE-- | ||
| <?php | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ | |
| # define MIN(x, y) ((x) > (y)? (y) : (x)) | ||
| #endif | ||
|
|
||
| #define SEG_ALLOC_SIZE_MAX 32*1024*1024 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems a slightly unrelated change to me (I do not say it is right or wrong tough).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On Solaris, OPcache uses the SysV SHM allocator (shared_alloc_shm.c), which hard-limits individual segments to 32 MB (SEG_ALLOC_SIZE_MAX). With JIT enabled, OPcache reserves a default 64 MB buffer (ZEND_JIT_DEFAULT_BUFFER_SIZE) from the last shared segment during zend_shared_alloc_startup(). This makes startup fail with “Insufficient shared memory!” because the last segment can never satisfy the reservation.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure, but what I understood from the comment is opcache on solaris can't work without this change ? If that is the case, this change needs to be a PR on its own as a bug fix (from the lowest branch it needs to apply).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have created #20719 . |
||
| #define SEG_ALLOC_SIZE_MAX 64*1024*1024 /* 64MB to match ZEND_JIT_DEFAULT_BUFFER_SIZE */ | ||
| #define SEG_ALLOC_SIZE_MIN 2*1024*1024 | ||
|
|
||
| typedef struct { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ pcntl | |
| --SKIPIF-- | ||
| <?php | ||
| if (!function_exists("pcntl_setcpuaffinity")) die("skip pcntl_setcpuaffinity is not available"); | ||
| if (PHP_OS_FAMILY === 'Solaris') die("skip CPU affinity not supported on Solaris"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the test failing and in which manner ? because as far as I see it is supported by solaris.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It fails like this:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the test might need adaptation rather than disabling it, pset_create seems to set errno to |
||
| ?> | ||
| --FILE-- | ||
| <?php | ||
|
|
||
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.
does it represent all flavors of illumos ? maybe the reverse logic might be simpler ?
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 hope it does. Solaris 11.4 returns e.g.
11.4.90.211.0and Solaris 10 e.g.Generic_150400-29. Not sure when Illuoms did relevant change. But it must have been originally the same value as is in Solaris.