From ed9462bb49b552465d745b9abc89e028aedef022 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Wed, 17 Jun 2026 16:38:31 +0800 Subject: [PATCH] =?UTF-8?q?chore(tests):=20=E7=A7=BB=E9=99=A4=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E5=87=BD=E6=95=B0=E6=B5=8B=E8=AF=95=E4=B8=AD?= =?UTF-8?q?=E7=9A=84AOT=E9=99=90=E5=88=B6=E8=B7=B3=E8=BF=87=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除多个字符串函数测试文件中的 skip AOT limitation 条件 - 在005.phpt中将INI设置移至FILE部分并使用ini_set函数 - 更新addcslashes_005.phpt中的错误输出格式 - 修改bug67252.phpt中跳过条件的注释方式 - 调整bug68710.phpt和bug72663_2.phpt中的完成标记输出 - 移除trim相关 --- tests/std/strings/005.phpt | 6 +- tests/std/strings/addcslashes_005.phpt | 5 +- tests/std/strings/bug67252.phpt | 4 +- tests/std/strings/bug68710.phpt | 6 +- tests/std/strings/bug72663_2.phpt | 7 +- tests/std/strings/trim.diff | 10 --- tests/std/strings/trim.exp | 18 ----- tests/std/strings/trim.log | 40 ---------- tests/std/strings/trim.out | 18 ----- tests/std/strings/trim.php | 25 ------ tests/std/strings/trim.phpt | 2 +- tests/std/strings/trim.sh | 106 ------------------------- 12 files changed, 9 insertions(+), 238 deletions(-) delete mode 100644 tests/std/strings/trim.diff delete mode 100644 tests/std/strings/trim.exp delete mode 100644 tests/std/strings/trim.log delete mode 100644 tests/std/strings/trim.out delete mode 100644 tests/std/strings/trim.php delete mode 100755 tests/std/strings/trim.sh diff --git a/tests/std/strings/005.phpt b/tests/std/strings/005.phpt index ee93c8f6..357b1359 100644 --- a/tests/std/strings/005.phpt +++ b/tests/std/strings/005.phpt @@ -1,17 +1,13 @@ --TEST-- highlight_string(), output buffer and error level --SKIPIF-- - ---INI-- -error_reporting=8192 --FILE-- --CREDITS-- marcosptf - #phptestfest PHPSP on Google - Sao Paulo - Brazil - 2014-06-05 --FILE-- --EXPECTF-- -Warning: addcslashes(): Invalid '..'-range, '..'-range needs to be incrementing in %s on line %d +%s: Invalid '..'-range, '..'-range needs to be incrementing in %s on line %d \zoo['\.'] diff --git a/tests/std/strings/bug67252.phpt b/tests/std/strings/bug67252.phpt index 95997a73..b905c23a 100644 --- a/tests/std/strings/bug67252.phpt +++ b/tests/std/strings/bug67252.phpt @@ -2,7 +2,7 @@ Bug #67252 (convert_uudecode out-of-bounds read) --SKIPIF-- --FILE-- --EXPECTF-- -Warning: convert_uudecode(): Argument #1 ($data) is not a valid uuencoded string in %s on line %d +%s: Argument #1 ($data) is not a valid uuencoded string in %s on line %d bool(false) diff --git a/tests/std/strings/bug68710.phpt b/tests/std/strings/bug68710.phpt index 0f12b1f5..007837ce 100644 --- a/tests/std/strings/bug68710.phpt +++ b/tests/std/strings/bug68710.phpt @@ -2,9 +2,6 @@ Bug #68710 Use after free vulnerability in unserialize() (bypassing the CVE-2014-8142 fix) --SKIPIF-- - --FILE-- -===DONE=== +echo "===DONE===\n"; ?> --EXPECT-- ===DONE=== diff --git a/tests/std/strings/bug72663_2.phpt b/tests/std/strings/bug72663_2.phpt index 7b279997..7e8c6f8c 100644 --- a/tests/std/strings/bug72663_2.phpt +++ b/tests/std/strings/bug72663_2.phpt @@ -2,10 +2,8 @@ Bug #72663: Create an Unexpected Object and Don't Invoke __wakeup() in Deserialization --SKIPIF-- ---EXTENSIONS-- -session --FILE-- -DONE +echo "DONE\n"; ?> --EXPECTF-- Warning: session_decode(): Unexpected end of serialized data in %s on line %d diff --git a/tests/std/strings/trim.diff b/tests/std/strings/trim.diff deleted file mode 100644 index 251dc8b1..00000000 --- a/tests/std/strings/trim.diff +++ /dev/null @@ -1,10 +0,0 @@ --- - bool(true) - bool(true) - bool(true) -016- bool(true) -017- bool(true) -018- bool(true) -016+ bool(false) -017+ bool(false) -018+ bool(false) diff --git a/tests/std/strings/trim.exp b/tests/std/strings/trim.exp deleted file mode 100644 index 71739f30..00000000 --- a/tests/std/strings/trim.exp +++ /dev/null @@ -1,18 +0,0 @@ -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) \ No newline at end of file diff --git a/tests/std/strings/trim.log b/tests/std/strings/trim.log deleted file mode 100644 index ab8bfd67..00000000 --- a/tests/std/strings/trim.log +++ /dev/null @@ -1,40 +0,0 @@ - ----- EXPECTED OUTPUT -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) ----- ACTUAL OUTPUT -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(false) -bool(false) -bool(false) ----- FAILED diff --git a/tests/std/strings/trim.out b/tests/std/strings/trim.out deleted file mode 100644 index 0820f275..00000000 --- a/tests/std/strings/trim.out +++ /dev/null @@ -1,18 +0,0 @@ -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(false) -bool(false) -bool(false) \ No newline at end of file diff --git a/tests/std/strings/trim.php b/tests/std/strings/trim.php deleted file mode 100644 index c1fea925..00000000 --- a/tests/std/strings/trim.php +++ /dev/null @@ -1,25 +0,0 @@ - --FILE-- &1 - ;; -"lldb") - lldb -- '/opt/php-8.4/bin/php' -d "output_handler=" -d "open_basedir=" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=30719" -d "fatal_error_backtraces=Off" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=0" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "ignore_repeated_errors=0" -d "precision=14" -d "serialize_precision=-1" -d "memory_limit=128M" -d "opcache.fast_shutdown=0" -d "opcache.file_update_protection=0" -d "opcache.revalidate_freq=0" -d "opcache.jit_hot_loop=1" -d "opcache.jit_hot_func=1" -d "opcache.jit_hot_return=1" -d "opcache.jit_hot_side_exit=1" -d "opcache.jit_max_root_traces=100000" -d "opcache.jit_max_side_traces=100000" -d "opcache.jit_max_exit_counters=100000" -d "opcache.protect_memory=1" -d "zend.assertions=1" -d "zend.exception_ignore_args=0" -d "zend.exception_string_param_max_len=15" -d "short_open_tag=0" -d "session.auto_start=0" -d "zlib.output_compression=Off" -f "/home/swoole/workspace/aot/compiler/tests/std/strings/trim.php" 2>&1 - ;; -"valgrind") - USE_ZEND_ALLOC=0 valgrind $2 '/opt/php-8.4/bin/php' -d "output_handler=" -d "open_basedir=" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=30719" -d "fatal_error_backtraces=Off" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=0" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "ignore_repeated_errors=0" -d "precision=14" -d "serialize_precision=-1" -d "memory_limit=128M" -d "opcache.fast_shutdown=0" -d "opcache.file_update_protection=0" -d "opcache.revalidate_freq=0" -d "opcache.jit_hot_loop=1" -d "opcache.jit_hot_func=1" -d "opcache.jit_hot_return=1" -d "opcache.jit_hot_side_exit=1" -d "opcache.jit_max_root_traces=100000" -d "opcache.jit_max_side_traces=100000" -d "opcache.jit_max_exit_counters=100000" -d "opcache.protect_memory=1" -d "zend.assertions=1" -d "zend.exception_ignore_args=0" -d "zend.exception_string_param_max_len=15" -d "short_open_tag=0" -d "session.auto_start=0" -d "zlib.output_compression=Off" -f "/home/swoole/workspace/aot/compiler/tests/std/strings/trim.php" 2>&1 - ;; -"rr") - rr record $2 '/opt/php-8.4/bin/php' -d "output_handler=" -d "open_basedir=" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=30719" -d "fatal_error_backtraces=Off" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=0" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "ignore_repeated_errors=0" -d "precision=14" -d "serialize_precision=-1" -d "memory_limit=128M" -d "opcache.fast_shutdown=0" -d "opcache.file_update_protection=0" -d "opcache.revalidate_freq=0" -d "opcache.jit_hot_loop=1" -d "opcache.jit_hot_func=1" -d "opcache.jit_hot_return=1" -d "opcache.jit_hot_side_exit=1" -d "opcache.jit_max_root_traces=100000" -d "opcache.jit_max_side_traces=100000" -d "opcache.jit_max_exit_counters=100000" -d "opcache.protect_memory=1" -d "zend.assertions=1" -d "zend.exception_ignore_args=0" -d "zend.exception_string_param_max_len=15" -d "short_open_tag=0" -d "session.auto_start=0" -d "zlib.output_compression=Off" -f "/home/swoole/workspace/aot/compiler/tests/std/strings/trim.php" 2>&1 - ;; -*) - '/opt/php-8.4/bin/php' -d "output_handler=" -d "open_basedir=" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=30719" -d "fatal_error_backtraces=Off" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=0" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "ignore_repeated_errors=0" -d "precision=14" -d "serialize_precision=-1" -d "memory_limit=128M" -d "opcache.fast_shutdown=0" -d "opcache.file_update_protection=0" -d "opcache.revalidate_freq=0" -d "opcache.jit_hot_loop=1" -d "opcache.jit_hot_func=1" -d "opcache.jit_hot_return=1" -d "opcache.jit_hot_side_exit=1" -d "opcache.jit_max_root_traces=100000" -d "opcache.jit_max_side_traces=100000" -d "opcache.jit_max_exit_counters=100000" -d "opcache.protect_memory=1" -d "zend.assertions=1" -d "zend.exception_ignore_args=0" -d "zend.exception_string_param_max_len=15" -d "short_open_tag=0" -d "session.auto_start=0" -d "zlib.output_compression=Off" -f "/home/swoole/workspace/aot/compiler/tests/std/strings/trim.php" 2>&1 - ;; -esac \ No newline at end of file