diff options
author | Arpad Ray <arpad@php.net> | 2012-01-04 11:44:05 +0000 |
---|---|---|
committer | Arpad Ray <arpad@php.net> | 2012-01-04 11:44:05 +0000 |
commit | ed4041c6c5d69b19a0818a73b9dfff4212c792da (patch) | |
tree | b92f5d3e09a7dee289aab646c22b66dbb8354bbb | |
parent | b31c12435cdd260485d3ec078299d18f26f69f53 (diff) | |
download | php-git-ed4041c6c5d69b19a0818a73b9dfff4212c792da.tar.gz |
add more tests for #60634 (stems from #21306) and xfail them all for the moment
-rw-r--r-- | ext/session/tests/bug60634.phpt | 3 | ||||
-rw-r--r-- | ext/session/tests/bug60634_error_1.phpt | 49 | ||||
-rw-r--r-- | ext/session/tests/bug60634_error_2.phpt | 49 | ||||
-rw-r--r-- | ext/session/tests/bug60634_error_3.phpt | 48 | ||||
-rw-r--r-- | ext/session/tests/bug60634_error_4.phpt | 48 | ||||
-rw-r--r-- | ext/session/tests/bug60634_error_5.phpt | 49 |
6 files changed, 245 insertions, 1 deletions
diff --git a/ext/session/tests/bug60634.phpt b/ext/session/tests/bug60634.phpt index e2dfd15b37..2ec0c26c13 100644 --- a/ext/session/tests/bug60634.phpt +++ b/ext/session/tests/bug60634.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) +--XFAIL-- +Long term low priority bug, working on it --INI-- session.save_path= session.name=PHPSESSID @@ -42,4 +44,3 @@ echo "um, hi\n"; ?> --EXPECTF-- write: goodbye cruel world -close: goodbye cruel world diff --git a/ext/session/tests/bug60634_error_1.phpt b/ext/session/tests/bug60634_error_1.phpt new file mode 100644 index 0000000000..3b6e394eed --- /dev/null +++ b/ext/session/tests/bug60634_error_1.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + undefined_function(); +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); +session_write_close(); +echo "um, hi\n"; + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Call to undefined function undefined_function() in %s on line %d diff --git a/ext/session/tests/bug60634_error_2.phpt b/ext/session/tests/bug60634_error_2.phpt new file mode 100644 index 0000000000..265fb303f7 --- /dev/null +++ b/ext/session/tests/bug60634_error_2.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write during exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + throw new Exception; +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); +session_write_close(); +echo "um, hi\n"; + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Uncaught exception 'Exception' in %s diff --git a/ext/session/tests/bug60634_error_3.phpt b/ext/session/tests/bug60634_error_3.phpt new file mode 100644 index 0000000000..b2004d68bc --- /dev/null +++ b/ext/session/tests/bug60634_error_3.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write after exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; + exit; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + undefined_function(); +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Call to undefined function undefined_function() in %s on line %d diff --git a/ext/session/tests/bug60634_error_4.phpt b/ext/session/tests/bug60634_error_4.phpt new file mode 100644 index 0000000000..60bc0dcf54 --- /dev/null +++ b/ext/session/tests/bug60634_error_4.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; + exit; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + throw new Exception; +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Uncaught exception 'Exception' in %s diff --git a/ext/session/tests/bug60634_error_5.phpt b/ext/session/tests/bug60634_error_5.phpt new file mode 100644 index 0000000000..376b65f20b --- /dev/null +++ b/ext/session/tests/bug60634_error_5.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in close during exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; + undefined_function(); +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + return true; +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); +session_write_close(); +echo "um, hi\n"; + +?> +--EXPECTF-- +close: goodbye cruel world + +Fatal error: Call to undefined function undefined_function() in %s on line %d |