From 135476bdb8efac5c6b8b41a8d464dbc75e695c50 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Mon, 7 Apr 2008 22:33:08 +0000 Subject: [PATCH] MFB: Test updates --- ext/oci8/tests/pecl_bug10194_blob.phpt | 5 ++- ext/oci8/tests/pecl_bug10194_blob_64.phpt | 54 +++++++++++++++++++++++ ext/oci8/tests/testping.phpt | 25 +++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 ext/oci8/tests/pecl_bug10194_blob_64.phpt create mode 100644 ext/oci8/tests/testping.phpt diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt index 85b56c7017..c9d6b14b33 100644 --- a/ext/oci8/tests/pecl_bug10194_blob.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob.phpt @@ -1,7 +1,10 @@ --TEST-- PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) --SKIPIF-- - + --INI-- memory_limit=9M --FILE-- diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt new file mode 100644 index 0000000000..9b98989f38 --- /dev/null +++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt @@ -0,0 +1,54 @@ +--TEST-- +PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside the callback) +--SKIPIF-- + +--INI-- +memory_limit=6M +--FILE-- +write($string); +} + +oci_commit($c); + +$ora_sql = "SELECT blob FROM ".$schema.$table_name; +$statement = oci_parse($c,$ora_sql); +oci_execute($statement); + +echo "Before load()\n"; + +$row = oci_fetch_assoc($statement); +var_dump(strlen($row['BLOB']->load())); /* here it should fail */ + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; +?> +--EXPECTF-- +Before load() + +Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d diff --git a/ext/oci8/tests/testping.phpt b/ext/oci8/tests/testping.phpt new file mode 100644 index 0000000000..1556d81d1e --- /dev/null +++ b/ext/oci8/tests/testping.phpt @@ -0,0 +1,25 @@ +--TEST-- +Exercise OCIPing functionality on reconnect (code coverage test) +--SKIPIF-- + +--INI-- +oci8.ping_interval=0 +--FILE-- + +--EXPECTF-- +Done -- 2.50.1