From 71ca6b83ce4ac9656bda60df4d5ab12a3f7d7eda Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Wed, 1 Jul 2009 12:51:40 +0000 Subject: [PATCH] Adding XFAIL for some tests which expect the zval cache of mysqlnd to be on. It has been disabled for the PHP 5.3.0 release. Adding INI sections to ensure that statistics are collected. Adding tests that check if statistics collection can be disabled --- ext/mysqli/tests/mysqli_get_cache_stats.phpt | 9 ++- .../mysqli_get_cache_stats_free_buffered.phpt | 5 ++ .../tests/mysqli_get_cache_stats_off.phpt | 55 +++++++++++++++++++ .../tests/mysqli_get_client_stats_off.phpt | 12 +++- .../mysqli_get_client_stats_skipped.phpt | 3 + .../tests/mysqli_get_connection_stats.phpt | 5 +- .../mysqli_get_connection_stats_off.phpt | 53 ++++++++++++++++++ 7 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 ext/mysqli/tests/mysqli_get_cache_stats_off.phpt create mode 100644 ext/mysqli/tests/mysqli_get_connection_stats_off.phpt diff --git a/ext/mysqli/tests/mysqli_get_cache_stats.phpt b/ext/mysqli/tests/mysqli_get_cache_stats.phpt index c9dcc09598..745787f7ff 100644 --- a/ext/mysqli/tests/mysqli_get_cache_stats.phpt +++ b/ext/mysqli/tests/mysqli_get_cache_stats.phpt @@ -1,5 +1,10 @@ --TEST-- mysqli_get_cache_stats() +--XFAIL-- +zval caching has been temporarily disabled for the 5.3.0 release +--INI-- +mysqlnd.collect_statistics="1" +mysqlnd.collect_memory_statistics="1" --SKIPIF-- +--FILE-- + true, "free_items" => true, "references" => true); + foreach ($after as $k => $v) { + if ($v != 0 && !isset($ignore[$k])) { + printf("[005] Field %s should not have any other value but 0, got %s.\n", + $k, $v); + } + } + + mysqli_close($link); + + print "done!"; +?> +--EXPECTF-- +done! \ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt index 8a731ca746..9594eb526f 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt @@ -15,19 +15,25 @@ mysqlnd.collect_memory_statistics=0 --FILE-- $v) if ($v != 0) { - printf("[002] Field %s should not have any other value but 0, got %s.\n", + printf("[003] Field %s should not have any other value but 0, got %s.\n", $k, $v); } diff --git a/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt b/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt index 9dd802db0d..0358656ab5 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt @@ -1,5 +1,8 @@ --TEST-- mysqli_get_client_stats() - skipped rows +--INI-- +mysqlnd.collect_statistics="1" +mysqlnd.collect_memory_statistics="1" --SKIPIF-- +--FILE-- + $v) + if ($v != 0) { + printf("[004] Field %s should not have any other value but 0, got %s.\n", + $k, $v); + } + + mysqli_close($link); + print "done!"; +?> +--EXPECTF-- +done! \ No newline at end of file -- 2.50.1