From 924f86db0bd228729d7e530dde1d27d2485666fa Mon Sep 17 00:00:00 2001 From: Petr Sumbera Date: Fri, 12 Dec 2025 07:21:39 -0500 Subject: [PATCH] Fix Solaris tests and enable CI --- .github/actions/solaris/action.yml | 85 +++++++++++ .github/workflows/nightly.yml | 24 +++ .github/workflows/push.yml | 11 ++ .github/workflows/root.yml | 1 + Zend/tests/stack_limit/stack_limit_010.phpt | 4 +- ext/calendar/tests/unixtojd.phpt | 6 + ext/ctype/tests/bug25745.phpt | 6 + ext/date/lib/parse_date.c | 13 +- ext/date/tests/bug33532.phpt | 2 +- ext/date/tests/gmstrftime_variation16.phpt | 3 + ext/date/tests/strftime_variation16.phpt | 3 + ext/fileinfo/tests/finfo_upstream.phpt | 6 + ext/iconv/tests/bug37773.phpt | 3 + ext/iconv/tests/bug52211.phpt | 6 + ext/iconv/tests/bug69840.phpt | 6 + ext/iconv/tests/eucjp2iso2022jp.phpt | 6 + ext/iconv/tests/iconv003.phpt | 6 + ext/iconv/tests/iconv_basic_001.phpt | 1 + ext/iconv/tests/iconv_mime_encode.phpt | 6 + ext/iconv/tests/iconv_strrpos.phpt | 6 + .../tests/iconv_substr_out_of_bounds.phpt | 6 + ext/libxml/tests/bug61367-write.phpt | 2 +- ext/mysqli/tests/gh9590.phpt | 2 + ext/opcache/shared_alloc_shm.c | 2 +- ext/pcntl/tests/pcntl_cpuaffinity.phpt | 1 + ext/pcntl/tests/pcntl_getcpu.phpt | 1 + ext/posix/tests/posix_fpathconf.phpt | 15 +- .../tests/posix_isatty_value_errors.phpt | 19 ++- .../tests/posix_ttyname_value_errors.phpt | 14 +- .../tests/socket_addrinfo_explain.phpt | 7 +- ext/sockets/tests/socket_afpacket.phpt | 3 + .../tests/socket_create_pair-wrongparams.phpt | 2 +- ext/sockets/tests/socket_export_stream-4.phpt | 8 +- ext/sockets/tests/socket_import_stream-4.phpt | 8 +- ext/sockets/tests/socket_tcp_congestion.phpt | 3 + ext/standard/tests/file/005_variation2.phpt | 1 + ext/standard/tests/file/007_variation1.phpt | 2 +- .../tests/file/007_variation11-win32-mb.phpt | 2 +- .../tests/file/007_variation11-win32.phpt | 2 +- ext/standard/tests/file/007_variation11.phpt | 2 +- .../tests/file/007_variation13-win32.phpt | 2 +- ext/standard/tests/file/007_variation13.phpt | 2 +- ext/standard/tests/file/007_variation15.phpt | 2 +- ext/standard/tests/file/007_variation17.phpt | 2 +- ext/standard/tests/file/007_variation19.phpt | 2 +- ext/standard/tests/file/007_variation21.phpt | 2 +- ext/standard/tests/file/007_variation23.phpt | 2 +- ext/standard/tests/file/007_variation3.phpt | 2 +- ext/standard/tests/file/007_variation5.phpt | 2 +- ext/standard/tests/file/007_variation7.phpt | 2 +- ext/standard/tests/file/007_variation9.phpt | 2 +- ext/standard/tests/file/bug35781.phpt | 2 +- ext/standard/tests/file/bug65272.phpt | 6 + ext/standard/tests/file/fdatasync.phpt | 7 +- ext/standard/tests/file/fgetc_variation3.phpt | 18 +-- ext/standard/tests/file/fgets_variation1.phpt | 18 +-- .../tests/file/filetype_variation2.phpt | 8 +- ext/standard/tests/file/flock.phpt | 8 +- ext/standard/tests/file/flock_basic.phpt | 8 +- ext/standard/tests/file/flock_variation.phpt | 8 +- ext/standard/tests/file/fread_variation2.phpt | 144 +++++++++--------- ext/standard/tests/file/fread_variation4.phpt | 108 ++++++------- .../tests/file/fscanf_variation51.phpt | 126 +++++++-------- ext/standard/tests/file/fsync.phpt | 7 +- ext/standard/tests/file/fwrite.phpt | 2 +- .../file/fwrite_variation1-win32-mb.phpt | 48 +++--- .../tests/file/fwrite_variation1.phpt | 48 +++--- .../tests/file/lstat_stat_variation18.phpt | 4 +- .../tests/file/lstat_stat_variation19.phpt | 8 +- .../tests/file/lstat_stat_variation20.phpt | 8 +- .../tests/file/open_basedir_cwd_resolve.phpt | 2 +- .../tests/file/popen_pclose_error-sunos.phpt | 48 ------ .../tests/file/realpath_bug77484.phpt | 4 +- ext/standard/tests/filters/bug35916.phpt | 2 +- ext/standard/tests/filters/gh17345.phpt | 2 +- .../getservbyname_basic.phpt | 3 + .../general_functions/proc_nice_basic.phpt | 1 + .../tests/network/ip2long_variation2_x64.phpt | 1 + .../tests/network/syslog_new_line.phpt | 2 + .../tests/network/syslog_null_byte.phpt | 2 + ext/standard/tests/streams/bug54946.phpt | 6 +- ext/standard/tests/streams/gh9590-001.phpt | 2 + ext/standard/tests/streams/gh9590-002.phpt | 2 + ext/standard/tests/streams/glob-wrapper.phpt | 2 +- .../tests/strings/setlocale_basic1.phpt | 6 +- .../tests/strings/setlocale_basic2.phpt | 8 +- .../tests/strings/setlocale_basic3.phpt | 3 + .../tests/strings/setlocale_variation1.phpt | 3 + .../tests/strings/setlocale_variation2.phpt | 3 + ext/standard/tests/time/strptime_basic.phpt | 4 +- ...teVars_modification_validation_bypass.phpt | 4 +- ext/zend_test/tests/gh11078.phpt | 1 + ext/zlib/tests/zlib_wrapper_flock_basic.phpt | 6 + sapi/cli/tests/cli_process_title_unix.phpt | 3 + 94 files changed, 643 insertions(+), 391 deletions(-) create mode 100644 .github/actions/solaris/action.yml delete mode 100644 ext/standard/tests/file/popen_pclose_error-sunos.phpt diff --git a/.github/actions/solaris/action.yml b/.github/actions/solaris/action.yml new file mode 100644 index 0000000000000..afe1eab2ea883 --- /dev/null +++ b/.github/actions/solaris/action.yml @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 48628896f4982..d6a18afe8a448 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -29,6 +29,9 @@ on: run_freebsd_zts: required: true type: boolean + run_solaris_zts: + required: true + type: boolean ubuntu_version: required: true type: string @@ -1034,3 +1037,24 @@ jobs: configurationParameters: >- --${{ matrix.zts && 'enable' || 'disable' }}-zts runExtraTests: true + SOLARIS: + strategy: + fail-fast: false + matrix: + zts: [true, false] + exclude: + - zts: ${{ !inputs.run_solaris_zts && true || '*never*' }} + name: "SOLARIS_${{ matrix.zts && 'ZTS' || 'NTS' }}" + runs-on: ubuntu-latest + timeout-minutes: 50 + steps: + - name: git checkout + uses: actions/checkout@v5 + with: + ref: ${{ inputs.branch }} + - name: Solaris + uses: ./.github/actions/solaris + with: + configurationParameters: >- + --${{ matrix.zts && 'enable' || 'disable' }}-zts + runExtraTests: true diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 414969378dc70..d4803f7f311f6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,6 +18,7 @@ on: - PHP-8.4 - PHP-8.5 - master + - github-solaris-ci pull_request: paths-ignore: *ignore_paths branches: @@ -409,3 +410,13 @@ jobs: uses: actions/checkout@v5 - name: FreeBSD uses: ./.github/actions/freebsd + SOLARIS: + if: github.repository == 'psumbera/php-src' || github.event_name == 'pull_request' + name: SOLARIS + runs-on: ubuntu-latest + timeout-minutes: 50 + steps: + - name: git checkout + uses: actions/checkout@v5 + - name: Solaris + uses: ./.github/actions/solaris diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml index 778f722e4f2f1..6958f4f420af3 100644 --- a/.github/workflows/root.yml +++ b/.github/workflows/root.yml @@ -52,6 +52,7 @@ jobs: run_linux_ppc64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }} run_freebsd_zts: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }} + run_solaris_zts: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }} ubuntu_version: ${{ (((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04') || '22.04' }} diff --git a/Zend/tests/stack_limit/stack_limit_010.phpt b/Zend/tests/stack_limit/stack_limit_010.phpt index 4f8358fb41e71..85736423e41ee 100644 --- a/Zend/tests/stack_limit/stack_limit_010.phpt +++ b/Zend/tests/stack_limit/stack_limit_010.phpt @@ -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 }; diff --git a/ext/calendar/tests/unixtojd.phpt b/ext/calendar/tests/unixtojd.phpt index 3d0ffa3fea30e..c96c9695dc502 100644 --- a/ext/calendar/tests/unixtojd.phpt +++ b/ext/calendar/tests/unixtojd.phpt @@ -1,5 +1,11 @@ --TEST-- unixtojd() +--SKIPIF-- + --EXTENSIONS-- calendar --ENV-- diff --git a/ext/ctype/tests/bug25745.phpt b/ext/ctype/tests/bug25745.phpt index 420d2c18807ef..935ce4726ce01 100644 --- a/ext/ctype/tests/bug25745.phpt +++ b/ext/ctype/tests/bug25745.phpt @@ -2,6 +2,12 @@ Bug #25745 (ctype functions fail with non-ascii characters) --EXTENSIONS-- ctype +--SKIPIF-- + --INI-- error_reporting=E_ALL&~E_DEPRECATED --FILE-- diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 1fb7fb15ec01a..0b34fa5031ad6 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -171,7 +171,14 @@ static const timelib_tz_lookup_table timelib_timezone_utc[] = { }; #if defined(_POSIX_TZNAME_MAX) -# define MAX_ABBR_LEN _POSIX_TZNAME_MAX + /* Solaris exposes _POSIX_TZNAME_MAX = 3 unless _XPG6 is defined. + * That is too small for real-world timezone abbreviations ("EDT", "CEST", ...). + */ + #if defined(__sun__) && _POSIX_TZNAME_MAX < 6 + #define MAX_ABBR_LEN 6 + #else + #define MAX_ABBR_LEN _POSIX_TZNAME_MAX + #endif #elif defined(TZNAME_MAX) # define MAX_ABBR_LEN TZNAME_MAX #else @@ -24863,10 +24870,10 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain in.errors->error_messages = NULL; if (len > 0) { - while (isspace(*s) && s < e) { + while (isspace((unsigned char)*s) && s < e) { s++; } - while (isspace(*e) && e > s) { + while (isspace((unsigned char)*e) && e > s) { e--; } } diff --git a/ext/date/tests/bug33532.phpt b/ext/date/tests/bug33532.phpt index 7734cc955c7fd..f5468a605d36d 100644 --- a/ext/date/tests/bug33532.phpt +++ b/ext/date/tests/bug33532.phpt @@ -5,7 +5,7 @@ error_reporting=2047 date.timezone=UTC --SKIPIF-- --FILE-- diff --git a/ext/date/tests/gmstrftime_variation16.phpt b/ext/date/tests/gmstrftime_variation16.phpt index d80e19ef4f696..eca0618af1687 100644 --- a/ext/date/tests/gmstrftime_variation16.phpt +++ b/ext/date/tests/gmstrftime_variation16.phpt @@ -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-- --FILE-- --ENV-- TZ=UTC --FILE-- diff --git a/ext/iconv/tests/bug37773.phpt b/ext/iconv/tests/bug37773.phpt index 4dcdd56b3cb53..1d1b8f569ed1e 100644 --- a/ext/iconv/tests/bug37773.phpt +++ b/ext/iconv/tests/bug37773.phpt @@ -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-- --FILE-- --FILE-- --INI-- error_reporting=2039 --FILE-- diff --git a/ext/iconv/tests/iconv003.phpt b/ext/iconv/tests/iconv003.phpt index 86e2e207b2a13..f3c2da39ed780 100644 --- a/ext/iconv/tests/iconv003.phpt +++ b/ext/iconv/tests/iconv003.phpt @@ -2,6 +2,12 @@ iconv() test 3 --EXTENSIONS-- iconv +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --INI-- iconv.internal_charset=ISO-8859-1 --FILE-- diff --git a/ext/iconv/tests/iconv_substr_out_of_bounds.phpt b/ext/iconv/tests/iconv_substr_out_of_bounds.phpt index fa335ccc22e63..7f4c28ae11fc9 100644 --- a/ext/iconv/tests/iconv_substr_out_of_bounds.phpt +++ b/ext/iconv/tests/iconv_substr_out_of_bounds.phpt @@ -2,6 +2,12 @@ iconv_substr() with out of bounds offset --EXTENSIONS-- iconv +--SKIPIF-- + --FILE-- --FILE-- (y)? (y) : (x)) #endif -#define SEG_ALLOC_SIZE_MAX 32*1024*1024 +#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 { diff --git a/ext/pcntl/tests/pcntl_cpuaffinity.phpt b/ext/pcntl/tests/pcntl_cpuaffinity.phpt index 1e3809f928c78..9cc8b6709035d 100644 --- a/ext/pcntl/tests/pcntl_cpuaffinity.phpt +++ b/ext/pcntl/tests/pcntl_cpuaffinity.phpt @@ -5,6 +5,7 @@ pcntl --SKIPIF-- --FILE-- --FILE-- ---EXPECTF-- - -Warning: posix_fpathconf(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d -bool(false) -bool(true) -string(19) "Bad file descriptor" -posix_fpathconf(): Argument #1 ($file_descriptor) must be of type int|resource, string given -int(%d) +--EXPECTREGEX-- +Warning: posix_fpathconf\(\): Argument #1 \(\$file_descriptor\) must be between 0 and \d+ in .+ on line \d+ +bool\(false\) +bool\(true\) +string\(\d+\) "Bad file (descriptor|number)" +posix_fpathconf\(\): Argument #1 \(\$file_descriptor\) must be of type int\|resource, string given +int\(\d+\) diff --git a/ext/posix/tests/posix_isatty_value_errors.phpt b/ext/posix/tests/posix_isatty_value_errors.phpt index 599d892de0d35..37d965a8eb8b0 100644 --- a/ext/posix/tests/posix_isatty_value_errors.phpt +++ b/ext/posix/tests/posix_isatty_value_errors.phpt @@ -20,14 +20,13 @@ foreach ($values as $value) { var_dump(posix_strerror(posix_get_last_error())); } ?> ---EXPECTF-- +--EXPECTREGEX-- +Warning: posix_isatty\(\): Argument #1 \(\$file_descriptor\) must be between 0 and \d+ in .+ on line \d+ +bool\(false\) +string\(\d+\) "Bad file (descriptor|number)" +bool\(false\) +string\(\d+\) "Bad file (descriptor|number)" -Warning: posix_isatty(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d -bool(false) -string(19) "Bad file descriptor" -bool(false) -string(19) "Bad file descriptor" - -Warning: posix_isatty(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d -bool(false) -string(19) "Bad file descriptor" +Warning: posix_isatty\(\): Argument #1 \(\$file_descriptor\) must be between 0 and \d+ in .+ on line \d+ +bool\(false\) +string\(\d+\) "Bad file (descriptor|number)" diff --git a/ext/posix/tests/posix_ttyname_value_errors.phpt b/ext/posix/tests/posix_ttyname_value_errors.phpt index 31014fd6f3c65..1bee873174363 100644 --- a/ext/posix/tests/posix_ttyname_value_errors.phpt +++ b/ext/posix/tests/posix_ttyname_value_errors.phpt @@ -19,11 +19,11 @@ foreach ($values as $value) { var_dump(posix_strerror(posix_get_last_error())); } ?> ---EXPECTF-- -Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d -bool(false) -string(19) "Bad file descriptor" +--EXPECTREGEX-- +Warning: posix_ttyname\(\): Argument #1 \(\$file_descriptor\) must be between 0 and \d+ in .+ on line \d+ +bool\(false\) +string\(\d+\) "Bad file (descriptor|number)" -Warning: posix_ttyname(): Argument #1 ($file_descriptor) must be between 0 and %d in %s on line %d -bool(false) -string(19) "Bad file descriptor" +Warning: posix_ttyname\(\): Argument #1 \(\$file_descriptor\) must be between 0 and \d+ in .+ on line \d+ +bool\(false\) +string\(\d+\) "Bad file (descriptor|number)" diff --git a/ext/sockets/tests/socket_addrinfo_explain.phpt b/ext/sockets/tests/socket_addrinfo_explain.phpt index e06ed36a64ec8..ef516b9664960 100644 --- a/ext/sockets/tests/socket_addrinfo_explain.phpt +++ b/ext/sockets/tests/socket_addrinfo_explain.phpt @@ -12,6 +12,11 @@ $result = socket_addrinfo_explain($addrinfo[0]); // Musl sets ai_canonname even if AI_CANONNAME is not specified. unset($result['ai_canonname']); var_dump($result); +// Solaris uses different numeric values for SOCK_* constants, +// so avoid comparing raw integers in EXPECTF. +if ($result['ai_socktype'] != SOCK_DGRAM) { + echo "Wrong socktype\n"; +} echo "Done"; ?> --EXPECTF-- @@ -21,7 +26,7 @@ array(5) { ["ai_family"]=> int(2) ["ai_socktype"]=> - int(2) + int(%s) ["ai_protocol"]=> int(%d) ["ai_addr"]=> diff --git a/ext/sockets/tests/socket_afpacket.phpt b/ext/sockets/tests/socket_afpacket.phpt index 2e83a654766e0..a707ad48fa7a8 100644 --- a/ext/sockets/tests/socket_afpacket.phpt +++ b/ext/sockets/tests/socket_afpacket.phpt @@ -9,6 +9,9 @@ posix if (!defined("AF_PACKET")) { die('SKIP AF_PACKET not supported on this platform.'); } +if (!defined("ETH_P_IP")) { + die('SKIP ETH_P_IP not available on this platform.'); +} if (!function_exists("posix_getuid") || posix_getuid() != 0) { die('SKIP AF_PACKET requires root permissions.'); } diff --git a/ext/sockets/tests/socket_create_pair-wrongparams.phpt b/ext/sockets/tests/socket_create_pair-wrongparams.phpt index 8877e3d5b99ea..6f6baeadf3f94 100644 --- a/ext/sockets/tests/socket_create_pair-wrongparams.phpt +++ b/ext/sockets/tests/socket_create_pair-wrongparams.phpt @@ -27,7 +27,7 @@ try { ?> --EXPECTF-- -Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d +Warning: socket_create_pair(): Unable to create socket pair [%d]: %s %s in %s on line %d bool(false) socket_create_pair(): Argument #1 ($domain) must be one of AF_UNIX, AF_INET6, or AF_INET socket_create_pair(): Argument #2 ($type) must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM%A diff --git a/ext/sockets/tests/socket_export_stream-4.phpt b/ext/sockets/tests/socket_export_stream-4.phpt index a3879a93b7cd8..168671138680e 100644 --- a/ext/sockets/tests/socket_export_stream-4.phpt +++ b/ext/sockets/tests/socket_export_stream-4.phpt @@ -32,7 +32,9 @@ function test($stream, $sock) { echo "\n"; echo "socket_get_option "; try { - print_r(socket_get_option($sock, SOL_SOCKET, SO_TYPE)); + // Solaris uses different numeric values for SOCK_* constants + $opt = socket_get_option($sock, SOL_SOCKET, SO_TYPE); + print_r($opt === SOCK_DGRAM ? "DGRAM" : $opt); } catch (Error $e) { echo get_class($e), ": ", $e->getMessage(), "\n"; } @@ -81,12 +83,12 @@ echo "Done.\n"; normal stream_set_blocking 1 socket_set_block 1 -socket_get_option 2 +socket_get_option DGRAM unset stream socket_set_block 1 -socket_get_option 2 +socket_get_option DGRAM unset socket diff --git a/ext/sockets/tests/socket_import_stream-4.phpt b/ext/sockets/tests/socket_import_stream-4.phpt index efe987dfdce28..87ca608b862b9 100644 --- a/ext/sockets/tests/socket_import_stream-4.phpt +++ b/ext/sockets/tests/socket_import_stream-4.phpt @@ -31,7 +31,9 @@ function test($stream, $sock) { echo "\n"; echo "socket_get_option "; try { - print_r(socket_get_option($sock, SOL_SOCKET, SO_TYPE)); + // Solaris uses different numeric values for SOCK_* constants + $opt = socket_get_option($sock, SOL_SOCKET, SO_TYPE); + print_r($opt === SOCK_DGRAM ? "DGRAM" : $opt); } catch (Error $e) { echo get_class($e), ": ", $e->getMessage(), "\n"; } @@ -75,12 +77,12 @@ echo "Done.\n"; normal stream_set_blocking 1 socket_set_block 1 -socket_get_option 2 +socket_get_option DGRAM unset stream socket_set_block 1 -socket_get_option 2 +socket_get_option DGRAM unset socket diff --git a/ext/sockets/tests/socket_tcp_congestion.phpt b/ext/sockets/tests/socket_tcp_congestion.phpt index 56b587618548a..45853f6bf8ce2 100644 --- a/ext/sockets/tests/socket_tcp_congestion.phpt +++ b/ext/sockets/tests/socket_tcp_congestion.phpt @@ -7,6 +7,9 @@ sockets if (!defined('TCP_CONGESTION')) { die('skip TCP_CONGESTION test'); } +if (PHP_OS_FAMILY === 'Solaris' ) { + die("skip Solaris does not allow setting TCP_CONGESTION"); +} ?> --FILE-- --EXPECTF-- -Notice: fpassthru(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fpassthru(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d string(15) "Guvf vf n grfg " Done diff --git a/ext/standard/tests/file/bug65272.phpt b/ext/standard/tests/file/bug65272.phpt index 24e50d15bee34..0419a7023d69c 100644 --- a/ext/standard/tests/file/bug65272.phpt +++ b/ext/standard/tests/file/bug65272.phpt @@ -1,5 +1,11 @@ --TEST-- Bug #65272: flock() correctly sets wouldblock out param in windows +--SKIPIF-- + --FILE-- --FILE-- --EXPECT-- -- Checking for char -- diff --git a/ext/standard/tests/file/flock.phpt b/ext/standard/tests/file/flock.phpt index a3c1804584023..0e07114f9cd49 100644 --- a/ext/standard/tests/file/flock.phpt +++ b/ext/standard/tests/file/flock.phpt @@ -14,7 +14,13 @@ try { echo $e->getMessage(), "\n"; } -$fp = fopen($file, "w"); +/* + On Solaris, flock() is emulated via fcntl(). A shared lock (LOCK_SH) maps to + F_RDLCK, which requires the file descriptor to be open for reading. Using "w" + opens write-only and causes EBADF on Solaris. Open with "w+" so LOCK_SH works + portably across platforms. +*/ +$fp = fopen($file, "w+"); var_dump(flock($fp, LOCK_SH|LOCK_NB)); var_dump(flock($fp, LOCK_UN)); diff --git a/ext/standard/tests/file/flock_basic.phpt b/ext/standard/tests/file/flock_basic.phpt index 8b4ae30e0fd45..4fd4ea1e931fa 100644 --- a/ext/standard/tests/file/flock_basic.phpt +++ b/ext/standard/tests/file/flock_basic.phpt @@ -11,7 +11,13 @@ echo "*** Testing flock() fun with file and dir ***\n"; $lock_file = preg_replace("~\.phpt?$~", '', __FILE__); -$file_handle = fopen($lock_file, "w"); +/* + On Solaris, flock() is emulated via fcntl(). A shared lock (LOCK_SH) maps to + F_RDLCK, which requires the file descriptor to be open for reading. Using "w" + opens write-only and causes EBADF on Solaris. Open with "w+" so LOCK_SH works + portably across platforms. +*/ +$file_handle = fopen($lock_file, "w+"); var_dump(flock($file_handle, LOCK_SH|LOCK_NB)); var_dump(flock($file_handle, LOCK_UN)); var_dump(flock($file_handle, LOCK_EX)); diff --git a/ext/standard/tests/file/flock_variation.phpt b/ext/standard/tests/file/flock_variation.phpt index 1d73e90d254d4..1b17635db1cbb 100644 --- a/ext/standard/tests/file/flock_variation.phpt +++ b/ext/standard/tests/file/flock_variation.phpt @@ -6,7 +6,13 @@ echo "*** Testing flock() fun with the various operation and wouldblock values ***\n"; $file = preg_replace("~\.phpt?$~", '', __FILE__); -$fp = fopen($file, "w"); +/* + On Solaris, flock() is emulated via fcntl(). A shared lock (LOCK_SH) maps to + F_RDLCK, which requires the file descriptor to be open for reading. Using "w" + opens write-only and causes EBADF on Solaris. Open with "w+" so LOCK_SH works + portably across platforms. +*/ +$fp = fopen($file, "w+"); /* array of operations */ $operations = array( diff --git a/ext/standard/tests/file/fread_variation2.phpt b/ext/standard/tests/file/fread_variation2.phpt index a16c97a745aeb..7ba6db8fd621e 100644 --- a/ext/standard/tests/file/fread_variation2.phpt +++ b/ext/standard/tests/file/fread_variation2.phpt @@ -104,7 +104,7 @@ echo "Done\n"; int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -113,7 +113,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -123,7 +123,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -132,7 +132,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -142,7 +142,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -151,7 +151,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -161,7 +161,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -170,7 +170,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -180,7 +180,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -189,7 +189,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -199,7 +199,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -208,7 +208,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -218,7 +218,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -227,7 +227,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -237,7 +237,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -246,7 +246,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -256,7 +256,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -265,7 +265,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -277,7 +277,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -286,7 +286,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -296,7 +296,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -305,7 +305,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -315,7 +315,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -324,7 +324,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -334,7 +334,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -343,7 +343,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -353,7 +353,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -362,7 +362,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -372,7 +372,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -381,7 +381,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -391,7 +391,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -400,7 +400,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -410,7 +410,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -419,7 +419,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -429,7 +429,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -438,7 +438,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -450,7 +450,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -459,7 +459,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -469,7 +469,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -478,7 +478,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -488,7 +488,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -497,7 +497,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -507,7 +507,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -516,7 +516,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -526,7 +526,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -535,7 +535,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -545,7 +545,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -554,7 +554,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -564,7 +564,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -573,7 +573,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -583,7 +583,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -592,7 +592,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -602,7 +602,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -611,7 +611,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -623,7 +623,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -632,7 +632,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -642,7 +642,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -651,7 +651,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -661,7 +661,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -670,7 +670,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -680,7 +680,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -689,7 +689,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -699,7 +699,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -708,7 +708,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -718,7 +718,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -727,7 +727,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -737,7 +737,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -746,7 +746,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -756,7 +756,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -765,7 +765,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -775,7 +775,7 @@ bool(false) int(0) bool(false) Reading 1024 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -784,7 +784,7 @@ bool(false) int(0) bool(false) Reading 1000 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) diff --git a/ext/standard/tests/file/fread_variation4.phpt b/ext/standard/tests/file/fread_variation4.phpt index 97c6c39f9c8cf..2d2a0c425c1a5 100644 --- a/ext/standard/tests/file/fread_variation4.phpt +++ b/ext/standard/tests/file/fread_variation4.phpt @@ -102,7 +102,7 @@ echo"Done\n"; int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -110,7 +110,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -119,7 +119,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -127,7 +127,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -136,7 +136,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -144,7 +144,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -153,7 +153,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -161,7 +161,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -170,7 +170,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -178,7 +178,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -187,7 +187,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -195,7 +195,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -204,7 +204,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -212,7 +212,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -221,7 +221,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -229,7 +229,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -238,7 +238,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -246,7 +246,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -257,7 +257,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -265,7 +265,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -274,7 +274,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -282,7 +282,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -291,7 +291,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -299,7 +299,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -308,7 +308,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -316,7 +316,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -325,7 +325,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -333,7 +333,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -342,7 +342,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -350,7 +350,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -359,7 +359,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -367,7 +367,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -376,7 +376,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -384,7 +384,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -393,7 +393,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -401,7 +401,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -412,7 +412,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -420,7 +420,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -429,7 +429,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -437,7 +437,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -446,7 +446,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -454,7 +454,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -463,7 +463,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -471,7 +471,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -480,7 +480,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -488,7 +488,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -497,7 +497,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -505,7 +505,7 @@ bool(false) int(%r1024|1137%r) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(%r1024|1137%r) bool(false) @@ -514,7 +514,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -522,7 +522,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -531,7 +531,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -539,7 +539,7 @@ bool(false) int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(1024) bool(false) @@ -548,7 +548,7 @@ bool(false) int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(0) bool(false) @@ -556,7 +556,7 @@ bool(false) int(%r1024|1137%r) bool(false) Reading 10 bytes from file, expecting 0 bytes ... -Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d OK int(%r1024|1137%r) bool(false) diff --git a/ext/standard/tests/file/fscanf_variation51.phpt b/ext/standard/tests/file/fscanf_variation51.phpt index fad6132748282..266b0ca57319d 100644 --- a/ext/standard/tests/file/fscanf_variation51.phpt +++ b/ext/standard/tests/file/fscanf_variation51.phpt @@ -65,209 +65,209 @@ if(file_exists($filename)) { -- iteration 1 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 2 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 3 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 4 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 5 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 6 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 7 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 8 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -- iteration 9 -- -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) -Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fscanf(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) *** Done *** diff --git a/ext/standard/tests/file/fsync.phpt b/ext/standard/tests/file/fsync.phpt index 7a036a55d4d0d..dfa7404caa57e 100644 --- a/ext/standard/tests/file/fsync.phpt +++ b/ext/standard/tests/file/fsync.phpt @@ -34,7 +34,12 @@ fclose($file_handle); echo "\n*** Testing fsync(): attempting to sync stdin ***\n"; $file_handle = fopen("php://stdin", "w"); -var_dump(fsync($file_handle)); +// On Solaris, fsync() on stdin returns success +if (PHP_OS_FAMILY === 'Solaris') { + var_dump(!fsync($file_handle)); +} else { + var_dump(fsync($file_handle)); +} fclose($file_handle); echo "\n*** Testing fsync(): for non-file stream ***\n"; diff --git a/ext/standard/tests/file/fwrite.phpt b/ext/standard/tests/file/fwrite.phpt index 12bfb6727ec31..a0db5ff44f53c 100644 --- a/ext/standard/tests/file/fwrite.phpt +++ b/ext/standard/tests/file/fwrite.phpt @@ -29,7 +29,7 @@ $filename = __DIR__."/fwrite.dat"; --EXPECTF-- int(0) -Notice: fwrite(): Write of 4 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 4 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) int(4) diff --git a/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt b/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt index 94104a4b0f40a..ded9a098a8983 100644 --- a/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt @@ -76,13 +76,13 @@ echo "Done\n"; -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -92,13 +92,13 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -108,13 +108,13 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -126,13 +126,13 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6" -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -142,13 +142,13 @@ string(32) "e486000c4c8452774f746a27658d87fa" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -158,13 +158,13 @@ string(32) "e486000c4c8452774f746a27658d87fa" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -176,13 +176,13 @@ string(32) "e486000c4c8452774f746a27658d87fa" -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -192,13 +192,13 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -208,13 +208,13 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -226,13 +226,13 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb" -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -242,13 +242,13 @@ string(32) "3fabd48d8eaa65c14e0d93d6880c560c" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -258,13 +258,13 @@ string(32) "3fabd48d8eaa65c14e0d93d6880c560c" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) diff --git a/ext/standard/tests/file/fwrite_variation1.phpt b/ext/standard/tests/file/fwrite_variation1.phpt index 34a1c89c6939b..fcbf6ada1405e 100644 --- a/ext/standard/tests/file/fwrite_variation1.phpt +++ b/ext/standard/tests/file/fwrite_variation1.phpt @@ -68,13 +68,13 @@ echo "Done\n"; -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -84,13 +84,13 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -100,13 +100,13 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -118,13 +118,13 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6" -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -134,13 +134,13 @@ string(32) "e486000c4c8452774f746a27658d87fa" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -150,13 +150,13 @@ string(32) "e486000c4c8452774f746a27658d87fa" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -168,13 +168,13 @@ string(32) "e486000c4c8452774f746a27658d87fa" -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -184,13 +184,13 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -200,13 +200,13 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -218,13 +218,13 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb" -- Opening file in r -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -234,13 +234,13 @@ string(32) "3fabd48d8eaa65c14e0d93d6880c560c" -- Opening file in rb -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) @@ -250,13 +250,13 @@ string(32) "3fabd48d8eaa65c14e0d93d6880c560c" -- Opening file in rt -- int(0) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(0) bool(false) int(2) -Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: fwrite(): Write of 1024 bytes failed with errno=9 Bad file %s in %s on line %d bool(false) int(2) bool(false) diff --git a/ext/standard/tests/file/lstat_stat_variation18.phpt b/ext/standard/tests/file/lstat_stat_variation18.phpt index e3c8386e70f1d..9291de269396a 100644 --- a/ext/standard/tests/file/lstat_stat_variation18.phpt +++ b/ext/standard/tests/file/lstat_stat_variation18.phpt @@ -62,7 +62,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -118,7 +118,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> diff --git a/ext/standard/tests/file/lstat_stat_variation19.phpt b/ext/standard/tests/file/lstat_stat_variation19.phpt index 18ad03e52d29c..24af43599efa2 100644 --- a/ext/standard/tests/file/lstat_stat_variation19.phpt +++ b/ext/standard/tests/file/lstat_stat_variation19.phpt @@ -63,7 +63,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -117,7 +117,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -173,7 +173,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -227,7 +227,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> diff --git a/ext/standard/tests/file/lstat_stat_variation20.phpt b/ext/standard/tests/file/lstat_stat_variation20.phpt index 5bff0456eba5e..cfff4571ae160 100644 --- a/ext/standard/tests/file/lstat_stat_variation20.phpt +++ b/ext/standard/tests/file/lstat_stat_variation20.phpt @@ -72,7 +72,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -128,7 +128,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -182,7 +182,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -236,7 +236,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> diff --git a/ext/standard/tests/file/open_basedir_cwd_resolve.phpt b/ext/standard/tests/file/open_basedir_cwd_resolve.phpt index 753e21d997dda..25817cdd68f5d 100644 --- a/ext/standard/tests/file/open_basedir_cwd_resolve.phpt +++ b/ext/standard/tests/file/open_basedir_cwd_resolve.phpt @@ -11,5 +11,5 @@ var_dump(file_get_contents('/some/path/outside/open/basedir')); --EXPECTF-- Warning: file_get_contents(): open_basedir restriction in effect. File(/some/path/outside/open/basedir) is not within the allowed path(s): (%s) in %s on line %d -Warning: file_get_contents(/some/path/outside/open/basedir): Failed to open stream: Operation not permitted in %s on line %d +Warning: file_get_contents(/some/path/outside/open/basedir): Failed to open stream: %s in %s on line %d bool(false) diff --git a/ext/standard/tests/file/popen_pclose_error-sunos.phpt b/ext/standard/tests/file/popen_pclose_error-sunos.phpt deleted file mode 100644 index 981f1d5a6e6aa..0000000000000 --- a/ext/standard/tests/file/popen_pclose_error-sunos.phpt +++ /dev/null @@ -1,48 +0,0 @@ ---TEST-- -Test popen() and pclose function: error conditions ---SKIPIF-- - ---FILE-- - ---CLEAN-- - ---EXPECTF-- -*** Testing for error conditions *** - -Warning: Wrong parameter count for popen() in %s on line %d -NULL - -Warning: Wrong parameter count for popen() in %s on line %d -NULL -sh: abc.txt: not found -resource(%d) of type (stream) - -Warning: Wrong parameter count for pclose() in %s on line %d -NULL - -Warning: Wrong parameter count for pclose() in %s on line %d -NULL - -Warning: pclose(): supplied argument is not a valid stream resource in %s on line %d -bool(false) - ---- Done --- diff --git a/ext/standard/tests/file/realpath_bug77484.phpt b/ext/standard/tests/file/realpath_bug77484.phpt index 9aa3a335c2a96..0b78a2aad26f6 100644 --- a/ext/standard/tests/file/realpath_bug77484.phpt +++ b/ext/standard/tests/file/realpath_bug77484.phpt @@ -2,8 +2,8 @@ Bug #77484 Zend engine crashes when calling realpath in invalid working dir --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/general_functions/proc_nice_basic.phpt b/ext/standard/tests/general_functions/proc_nice_basic.phpt index 9e73a7f890b15..107f6d1865146 100644 --- a/ext/standard/tests/general_functions/proc_nice_basic.phpt +++ b/ext/standard/tests/general_functions/proc_nice_basic.phpt @@ -9,6 +9,7 @@ Simone Gentili (sensorario@gmail.com) --FILE-- diff --git a/ext/standard/tests/network/syslog_new_line.phpt b/ext/standard/tests/network/syslog_new_line.phpt index 69eb9c1d67e7e..d63f5714c79c2 100644 --- a/ext/standard/tests/network/syslog_new_line.phpt +++ b/ext/standard/tests/network/syslog_new_line.phpt @@ -4,6 +4,8 @@ Test syslog() function : new line in message --FILE-- --FILE-- --EXPECTF-- -Notice: stream_get_contents(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: stream_get_contents(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d string(0) "" -Notice: stream_get_contents(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: stream_get_contents(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d string(0) "" -Notice: stream_get_contents(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d +Notice: stream_get_contents(): Read of 8192 bytes failed with errno=9 Bad file %s in %s on line %d string(0) "" diff --git a/ext/standard/tests/streams/gh9590-001.phpt b/ext/standard/tests/streams/gh9590-001.phpt index 558e4660a65f8..8f5691af1adea 100644 --- a/ext/standard/tests/streams/gh9590-001.phpt +++ b/ext/standard/tests/streams/gh9590-001.phpt @@ -7,6 +7,8 @@ posix if (!function_exists('posix_setrlimit') || !posix_setrlimit(POSIX_RLIMIT_NOFILE, 2048, -1)) { die('skip Failed to set POSIX_RLIMIT_NOFILE'); } +if (PHP_OS_FAMILY === 'Solaris' && PHP_INT_SIZE === 8) + die('skip Solaris LP64 FD_SETSIZE=65536 not practically exceedable here'); ?> --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/xsl/tests/maxTemplateVars_modification_validation_bypass.phpt b/ext/xsl/tests/maxTemplateVars_modification_validation_bypass.phpt index d2e52aa6099ba..7d95f7c02bade 100644 --- a/ext/xsl/tests/maxTemplateVars_modification_validation_bypass.phpt +++ b/ext/xsl/tests/maxTemplateVars_modification_validation_bypass.phpt @@ -36,7 +36,7 @@ echo "--- Dump ---\n"; var_dump($proc); ?> ---EXPECT-- +--EXPECTF-- --- Set to 1 --- --- Set to -1 --- XSLTProcessor::$maxTemplateVars must be greater than or equal to 0 @@ -51,7 +51,7 @@ object(XSLTProcessor)#1 (4) { ["cloneDocument"]=> bool(false) ["maxTemplateDepth"]=> - int(3000) + int(%d) ["maxTemplateVars"]=> int(1) } diff --git a/ext/zend_test/tests/gh11078.phpt b/ext/zend_test/tests/gh11078.phpt index 5279d703b2733..2aed49480b021 100644 --- a/ext/zend_test/tests/gh11078.phpt +++ b/ext/zend_test/tests/gh11078.phpt @@ -6,6 +6,7 @@ zend_test --FILE-- --EXTENSIONS-- zlib --FILE-- diff --git a/sapi/cli/tests/cli_process_title_unix.phpt b/sapi/cli/tests/cli_process_title_unix.phpt index 166cb79ad3a67..9f4d5ba6ce5e1 100644 --- a/sapi/cli/tests/cli_process_title_unix.phpt +++ b/sapi/cli/tests/cli_process_title_unix.phpt @@ -13,6 +13,9 @@ exec("ps -p 1", $output, $exit_code); if ($exit_code !== 0) { die("skip ps -p is not available"); } +if (PHP_OS_FAMILY === 'Solaris') { + die("skip process titles not supported on Solaris"); +} ?> --FILE--