From c3f45be756562994b4865173585ce6d370488273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sun, 17 Apr 2022 12:18:01 +0200 Subject: [PATCH 1/4] Test online tests in CI --- .github/actions/test-linux/action.yml | 1 - .github/actions/test-macos/action.yml | 1 - .travis.yml | 2 +- appveyor/test_task.bat | 2 +- azure/test.yml | 1 - ext/xmlreader/tests/bug70309.phpt | 44 --------------------------- 6 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 ext/xmlreader/tests/bug70309.phpt diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 7db8fa58900d..729224202a4f 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -27,7 +27,6 @@ runs: sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ -j$(/usr/bin/nproc) \ -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ - --offline \ --show-diff \ --show-slow 1000 \ --set-timeout 120 diff --git a/.github/actions/test-macos/action.yml b/.github/actions/test-macos/action.yml index 99ac49b268c7..864a75c279f5 100644 --- a/.github/actions/test-macos/action.yml +++ b/.github/actions/test-macos/action.yml @@ -14,7 +14,6 @@ runs: sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ -j$(sysctl -n hw.ncpu) \ -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ - --offline \ --show-diff \ --show-slow 1000 \ --set-timeout 120 diff --git a/.travis.yml b/.travis.yml index 59ee5ebb2194..8ad9263facd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,7 +91,7 @@ before_script: script: # ARM64 CI reports nproc=32, which is excessive. - if [ -z "$ARM64" ]; then export JOBS=$(nproc); else export JOBS=16; fi - - ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS + - ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=16M -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS - sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");' after_success: diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index a97731a6ddd3..b9fb457c32c9 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -98,7 +98,7 @@ mkdir c:\tests_tmp set TEST_PHP_JUNIT=c:\junit.out.xml cd "%APPVEYOR_BUILD_FOLDER%" -nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%" +nmake test TESTS="%OPCACHE_OPTS% -q --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp %PARALLEL%" set EXIT_CODE=%errorlevel% diff --git a/azure/test.yml b/azure/test.yml index 1e2e1d6a1e3e..9e47ad17fa3b 100644 --- a/azure/test.yml +++ b/azure/test.yml @@ -16,7 +16,6 @@ steps: php run-tests.php -P -q \ -j$(/usr/bin/nproc) \ -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \ - --offline \ --show-diff \ --show-slow 1000 \ --set-timeout 120 \ diff --git a/ext/xmlreader/tests/bug70309.phpt b/ext/xmlreader/tests/bug70309.phpt deleted file mode 100644 index 199ad5df5fe9..000000000000 --- a/ext/xmlreader/tests/bug70309.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -XMLReader: Bug #70309 XmlReader read generates extra output ---SKIPIF-- - - - - ---FILE-- -xml(' - -Test Chapter - -This is a paragraph in the test chapter. It is unremarkable in -every regard. This is a paragraph in the test chapter. It is -unremarkable in every regard. This is a paragraph in the test -chapter. It is unremarkable in every regard. - - -This paragraph contains -some emphasized text -1and a superscript -and a subscript. - - -This is a paragraph in the test chapter. It is unremarkable in -every regard. This is a paragraph in the test chapter. It is -unremarkable in every regard. This is a paragraph in the test -chapter. It is unremarkable in every regard. - -'); - -$doc->setRelaxNGSchema('http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng'); - -while (@$doc->read() !== false); -?> -===DONE=== ---EXPECT-- -===DONE=== From 6b5b864d272e165dffbf132d7272e1b8af7248fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 22 Apr 2022 22:27:27 +0200 Subject: [PATCH 2/4] MSG_EOR is not supported on MacOS even if defined --- ext/sockets/sockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 7976c9cc758a..9f67fc07a384 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -482,7 +482,7 @@ static PHP_MINIT_FUNCTION(sockets) REGISTER_LONG_CONSTANT("MSG_TRUNC", MSG_TRUNC, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MSG_PEEK", MSG_PEEK, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MSG_DONTROUTE", MSG_DONTROUTE, CONST_CS | CONST_PERSISTENT); -#ifdef MSG_EOR +#if defined(MSG_EOR) && !defined(__APPLE__) REGISTER_LONG_CONSTANT("MSG_EOR", MSG_EOR, CONST_CS | CONST_PERSISTENT); #endif #ifdef MSG_EOF From 57a5492851f52b3030691554c1aa296cd463f291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 22 Apr 2022 22:27:27 +0200 Subject: [PATCH 3/4] Revert "MSG_EOR is not supported on MacOS even if defined" This reverts commit 52871d8bb5b5abe519d82da2b1ad826e5ba22d81. --- ext/sockets/sockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 9f67fc07a384..7976c9cc758a 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -482,7 +482,7 @@ static PHP_MINIT_FUNCTION(sockets) REGISTER_LONG_CONSTANT("MSG_TRUNC", MSG_TRUNC, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MSG_PEEK", MSG_PEEK, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MSG_DONTROUTE", MSG_DONTROUTE, CONST_CS | CONST_PERSISTENT); -#if defined(MSG_EOR) && !defined(__APPLE__) +#ifdef MSG_EOR REGISTER_LONG_CONSTANT("MSG_EOR", MSG_EOR, CONST_CS | CONST_PERSISTENT); #endif #ifdef MSG_EOF From d14c312bd1ca3729bd26b6d57ffbb88654de73d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 26 May 2022 22:32:03 +0200 Subject: [PATCH 4/4] fix test for MacOS instead --- ext/sockets/tests/socket_send.phpt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/sockets/tests/socket_send.phpt b/ext/sockets/tests/socket_send.phpt index 71ba5b028f8d..0affd6bf83a1 100644 --- a/ext/sockets/tests/socket_send.phpt +++ b/ext/sockets/tests/socket_send.phpt @@ -23,8 +23,10 @@ if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_OOB)===$stringSo print("okey\n"); } -if(!defined('MSG_EOR') || socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOR)===$stringSocketLength){ - print("okey\n"); +if (PHP_OS !== "Darwin") { // MSG_EOR seems unsupported on MacOS + if(!defined('MSG_EOR') || socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOR)===$stringSocketLength){ + print("okey\n"); + } } if(!defined('MSG_EOF') || socket_send($socket, $stringSocket, $stringSocketLength, MSG_EOF)===$stringSocketLength){