From 8f17d48b69a495363688b0516498cc8b9fb54a8d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 23 Oct 2020 16:17:13 +0200 Subject: Allow running session tests in parallel Use unique session IDs and/or save paths. Also removes the annoying order-dependence of session tests. --- ext/session/tests/003.phpt | 2 +- ext/session/tests/004.phpt | 10 +- ext/session/tests/005.phpt | 14 +- ext/session/tests/006.phpt | 2 +- ext/session/tests/009.phpt | 4 +- ext/session/tests/012.phpt | 2 +- ext/session/tests/013.phpt | 4 +- ext/session/tests/014.phpt | 2 +- ext/session/tests/015.phpt | 4 +- ext/session/tests/018.phpt | 4 +- ext/session/tests/019.phpt | 2 +- ext/session/tests/020.phpt | 4 +- ext/session/tests/021.phpt | 10 +- ext/session/tests/023.phpt | 2 +- ext/session/tests/024.phpt | 10 +- ext/session/tests/025.phpt | 14 +- ext/session/tests/026.phpt | 2 +- ext/session/tests/027.phpt | 4 +- ext/session/tests/CONFLICTS | 1 - ext/session/tests/bug41600.phpt | 4 +- ext/session/tests/bug42596.phpt | 2 +- ext/session/tests/rfc1867.phpt | 8 +- ext/session/tests/rfc1867_cleanup.phpt | 8 +- ext/session/tests/rfc1867_disabled.phpt | 8 +- ext/session/tests/rfc1867_disabled_2.phpt | 8 +- ext/session/tests/rfc1867_inter.phpt | 8 +- ext/session/tests/rfc1867_no_name.phpt | 8 +- ext/session/tests/rfc1867_sid_cookie.phpt | 8 +- ext/session/tests/rfc1867_sid_get.phpt | 6 +- ext/session/tests/rfc1867_sid_get_2.phpt | 8 +- ext/session/tests/rfc1867_sid_only_cookie.phpt | 8 +- ext/session/tests/rfc1867_sid_only_cookie_2.phpt | 4 +- ext/session/tests/rfc1867_sid_post.phpt | 4 +- ext/session/tests/session_basic1.phpt | 12 +- ext/session/tests/session_basic2.phpt | 4 +- ext/session/tests/session_basic3.phpt | 72 ++++---- ext/session/tests/session_basic5.phpt | 188 ++++++++++----------- ext/session/tests/session_commit_variation4.phpt | 14 +- .../tests/session_module_name_variation4.phpt | 3 + .../tests/session_save_path_variation4.phpt | 4 +- .../tests/session_save_path_variation5.phpt | 4 +- .../tests/session_set_save_handler_basic.phpt | 4 +- .../tests/session_set_save_handler_variation2.phpt | 4 +- .../tests/session_set_save_handler_variation3.phpt | 6 +- .../tests/session_set_save_handler_variation4.phpt | 6 +- .../tests/session_set_save_handler_variation5.phpt | 4 +- .../tests/session_set_save_handler_variation6.phpt | 4 +- 47 files changed, 266 insertions(+), 252 deletions(-) delete mode 100644 ext/session/tests/CONFLICTS (limited to 'ext/session') diff --git a/ext/session/tests/003.phpt b/ext/session/tests/003.phpt index e7e4294375..4f9b37b75d 100644 --- a/ext/session/tests/003.phpt +++ b/ext/session/tests/003.phpt @@ -17,7 +17,7 @@ class foo { function method() { $this->yes++; } } -session_id("abtest"); +session_id("test003"); session_start(); session_decode('baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}'); diff --git a/ext/session/tests/004.phpt b/ext/session/tests/004.phpt index 4b81a088b2..c3ed0c5616 100644 --- a/ext/session/tests/004.phpt +++ b/ext/session/tests/004.phpt @@ -55,7 +55,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test004"); session_start(); $_SESSION["baz"]->method(); $_SESSION["arr"][3]->method(); @@ -75,7 +75,7 @@ session_destroy(); ?> --EXPECT-- OPEN: PHPSESSID -READ: abtest +READ: test004 object(foo)#2 (2) { ["bar"]=> string(2) "ok" @@ -91,9 +91,9 @@ array(1) { int(2) } } -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} +WRITE: test004, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} OPEN: PHPSESSID -READ: abtest +READ: test004 object(foo)#3 (2) { ["bar"]=> string(2) "ok" @@ -109,4 +109,4 @@ array(1) { int(2) } } -DESTROY: abtest +DESTROY: test004 diff --git a/ext/session/tests/005.phpt b/ext/session/tests/005.phpt index a7b42de7fa..2b51ceed94 100644 --- a/ext/session/tests/005.phpt +++ b/ext/session/tests/005.phpt @@ -56,7 +56,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test005"); session_start(); session_decode($hnd->data); @@ -91,7 +91,7 @@ session_destroy(); ?> --EXPECT-- OPEN: PHPSESSID -READ: abtest +READ: test005 object(foo)#4 (2) { ["bar"]=> string(2) "ok" @@ -107,10 +107,10 @@ array(1) { int(2) } } -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} +WRITE: test005, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} CLOSE OPEN: PHPSESSID -READ: abtest +READ: test005 object(foo)#2 (2) { ["bar"]=> string(2) "ok" @@ -127,10 +127,10 @@ array(1) { } } int(123) -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; +WRITE: test005, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; CLOSE OPEN: PHPSESSID -READ: abtest +READ: test005 object(foo)#4 (2) { ["bar"]=> string(2) "ok" @@ -147,5 +147,5 @@ array(1) { } } int(123) -DESTROY: abtest +DESTROY: test005 CLOSE diff --git a/ext/session/tests/006.phpt b/ext/session/tests/006.phpt index 68cea7314a..e3c048748f 100644 --- a/ext/session/tests/006.phpt +++ b/ext/session/tests/006.phpt @@ -13,7 +13,7 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test006"); session_start(); class a { diff --git a/ext/session/tests/009.phpt b/ext/session/tests/009.phpt index 10069c21d0..898cf76a5a 100644 --- a/ext/session/tests/009.phpt +++ b/ext/session/tests/009.phpt @@ -13,14 +13,14 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test009"); ### Phase 1 cleanup session_start(); session_destroy(); ### Phase 2 $_SESSION["c"] does not contain any value -session_id("abtest"); +session_id("test009"); session_start(); var_dump($_SESSION); $_SESSION["name"] = "foo"; diff --git a/ext/session/tests/012.phpt b/ext/session/tests/012.phpt index c555d2ca1e..ad3f54962e 100644 --- a/ext/session/tests/012.phpt +++ b/ext/session/tests/012.phpt @@ -14,7 +14,7 @@ error_reporting(E_ALL); ### Absurd example, value of $_SESSION does not matter -session_id("abtest"); +session_id("test012"); session_start(); $_SESSION["_SESSION"] = Array(); $_SESSION = "kk"; diff --git a/ext/session/tests/013.phpt b/ext/session/tests/013.phpt index 32909eb58c..07fcea407b 100644 --- a/ext/session/tests/013.phpt +++ b/ext/session/tests/013.phpt @@ -12,10 +12,10 @@ session.save_handler=files diff --git a/ext/session/tests/015.phpt b/ext/session/tests/015.phpt index 527b86bc1d..788f1eac06 100644 --- a/ext/session/tests/015.phpt +++ b/ext/session/tests/015.phpt @@ -16,7 +16,7 @@ session.save_handler=files @@ -24,4 +24,4 @@ session_start(); session_destroy(); ?> --EXPECT-- - + diff --git a/ext/session/tests/018.phpt b/ext/session/tests/018.phpt index 5ec132b34f..d132abf717 100644 --- a/ext/session/tests/018.phpt +++ b/ext/session/tests/018.phpt @@ -16,7 +16,7 @@ session.save_handler=files error_reporting(E_ALL); -session_id("abtest"); +session_id("test018"); session_start(); ?>
@@ -24,4 +24,4 @@ session_start(); session_destroy(); ?> --EXPECT-- - + diff --git a/ext/session/tests/019.phpt b/ext/session/tests/019.phpt index d9a478245b..e3793a5522 100644 --- a/ext/session/tests/019.phpt +++ b/ext/session/tests/019.phpt @@ -23,7 +23,7 @@ class TFoo { } } -session_id("abtest"); +session_id("test019"); session_start(); $_SESSION["o1"] = new TFoo(42); diff --git a/ext/session/tests/020.phpt b/ext/session/tests/020.phpt index 267e52191c..f4ec38c8fb 100644 --- a/ext/session/tests/020.phpt +++ b/ext/session/tests/020.phpt @@ -17,7 +17,7 @@ session.save_handler=files error_reporting(E_ALL); -session_id("abtest"); +session_id("test020"); session_start(); ?> @@ -25,4 +25,4 @@ session_start(); session_destroy(); ?> --EXPECT-- - + diff --git a/ext/session/tests/021.phpt b/ext/session/tests/021.phpt index 4a97d7d32a..2532324fee 100644 --- a/ext/session/tests/021.phpt +++ b/ext/session/tests/021.phpt @@ -19,7 +19,7 @@ error_reporting(E_ALL); ini_set('session.trans_sid_hosts', 'php.net'); $_SERVER['HTTP_HOST'] = 'php.net'; -session_id("abtest"); +session_id("test021"); session_start(); ?> @@ -60,11 +60,11 @@ session_destroy(); --EXPECT--
- +
- +
- +
- +
diff --git a/ext/session/tests/023.phpt b/ext/session/tests/023.phpt index 23c7096f23..e9ce084256 100644 --- a/ext/session/tests/023.phpt +++ b/ext/session/tests/023.phpt @@ -17,7 +17,7 @@ class foo { function method() { $this->yes++; } } -session_id("abtest"); +session_id("test023"); session_start(); session_decode('baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}'); $baz = $_SESSION['baz']; diff --git a/ext/session/tests/024.phpt b/ext/session/tests/024.phpt index 174f2e2639..913956f5b3 100644 --- a/ext/session/tests/024.phpt +++ b/ext/session/tests/024.phpt @@ -56,7 +56,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test024"); session_start(); $baz = $_SESSION['baz']; @@ -79,7 +79,7 @@ session_destroy(); ?> --EXPECTF-- OPEN: PHPSESSID -READ: abtest +READ: test024 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -95,9 +95,9 @@ array(1) { int(2) } } -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} +WRITE: test024, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} OPEN: PHPSESSID -READ: abtest +READ: test024 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -113,4 +113,4 @@ array(1) { int(2) } } -DESTROY: abtest +DESTROY: test024 diff --git a/ext/session/tests/025.phpt b/ext/session/tests/025.phpt index 172ea579c6..4e91da9796 100644 --- a/ext/session/tests/025.phpt +++ b/ext/session/tests/025.phpt @@ -57,7 +57,7 @@ class foo { session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_id("abtest"); +session_id("test025"); session_start(); $baz = $_SESSION['baz']; $arr = $_SESSION['arr']; @@ -93,7 +93,7 @@ session_destroy(); ?> --EXPECTF-- OPEN: PHPSESSID -READ: abtest +READ: test025 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -109,10 +109,10 @@ array(1) { int(2) } } -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} +WRITE: test025, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} CLOSE OPEN: PHPSESSID -READ: abtest +READ: test025 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -129,10 +129,10 @@ array(1) { } } int(123) -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; +WRITE: test025, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; CLOSE OPEN: PHPSESSID -READ: abtest +READ: test025 object(foo)#%d (2) { ["bar"]=> string(2) "ok" @@ -149,5 +149,5 @@ array(1) { } } int(123) -DESTROY: abtest +DESTROY: test025 CLOSE diff --git a/ext/session/tests/026.phpt b/ext/session/tests/026.phpt index b61039ee0c..f5abdac0a5 100644 --- a/ext/session/tests/026.phpt +++ b/ext/session/tests/026.phpt @@ -13,7 +13,7 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test026"); session_start(); class a { diff --git a/ext/session/tests/027.phpt b/ext/session/tests/027.phpt index ebaf25467c..969bc5b872 100644 --- a/ext/session/tests/027.phpt +++ b/ext/session/tests/027.phpt @@ -13,14 +13,14 @@ session.save_handler=files error_reporting(E_ALL); ob_start(); -session_id("abtest"); +session_id("test027"); ### Phase 1 cleanup session_start(); session_destroy(); ### Phase 2 $_SESSION["c"] does not contain any value -session_id("abtest"); +session_id("test027"); session_start(); var_dump($_SESSION); $_SESSION["name"] = "foo"; diff --git a/ext/session/tests/CONFLICTS b/ext/session/tests/CONFLICTS deleted file mode 100644 index 30888ae480..0000000000 --- a/ext/session/tests/CONFLICTS +++ /dev/null @@ -1 +0,0 @@ -session diff --git a/ext/session/tests/bug41600.phpt b/ext/session/tests/bug41600.phpt index 79d5e12841..d4dfce9d88 100644 --- a/ext/session/tests/bug41600.phpt +++ b/ext/session/tests/bug41600.phpt @@ -17,7 +17,7 @@ session.save_handler=files error_reporting(E_ALL); -session_id("abtest"); +session_id("bug41600"); session_start(); ?> @@ -25,4 +25,4 @@ session_start(); session_destroy(); ?> --EXPECT-- - + diff --git a/ext/session/tests/bug42596.phpt b/ext/session/tests/bug42596.phpt index f27e86387e..83567bde5f 100644 --- a/ext/session/tests/bug42596.phpt +++ b/ext/session/tests/bug42596.phpt @@ -15,7 +15,7 @@ session.serialize_handler=php session.save_handler=files --FILE-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867 --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -50,7 +50,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_cleanup.phpt b/ext/session/tests/rfc1867_cleanup.phpt index ae5dcbe8dc..9baa6144ba 100644 --- a/ext/session/tests/rfc1867_cleanup.phpt +++ b/ext/session/tests/rfc1867_cleanup.phpt @@ -18,15 +18,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-cleanup --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-cleanup-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-cleanup-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -50,7 +50,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-cleanup" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_disabled.phpt b/ext/session/tests/rfc1867_disabled.phpt index 5bedb1de88..8d8effd1f4 100644 --- a/ext/session/tests/rfc1867_disabled.phpt +++ b/ext/session/tests/rfc1867_disabled.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-disabled --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-disabled-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-disabled-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="file1"; filename="file1.txt" @@ -44,7 +44,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-disabled" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_disabled_2.phpt b/ext/session/tests/rfc1867_disabled_2.phpt index d63748369d..c539c6eaea 100644 --- a/ext/session/tests/rfc1867_disabled_2.phpt +++ b/ext/session/tests/rfc1867_disabled_2.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-disabled-2 --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-disabled-2-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-disabled-2-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="file1"; filename="file1.txt" @@ -44,7 +44,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-disabled-2" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_inter.phpt b/ext/session/tests/rfc1867_inter.phpt index b961bbcac3..fd28dfe07a 100644 --- a/ext/session/tests/rfc1867_inter.phpt +++ b/ext/session/tests/rfc1867_inter.phpt @@ -18,15 +18,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-inter --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-inter-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-inter-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -54,7 +54,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__) . "_2"])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-inter" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_no_name.phpt b/ext/session/tests/rfc1867_no_name.phpt index 98e8e7cf09..15877a664e 100644 --- a/ext/session/tests/rfc1867_no_name.phpt +++ b/ext/session/tests/rfc1867_no_name.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-no-name --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-no-name-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-no-name-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="file1"; filename="file1.txt" @@ -44,7 +44,7 @@ var_dump(isset($_SESSION["upload_progress_" . basename(__FILE__)])); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-no-name" array(2) { ["file1"]=> array(5) { diff --git a/ext/session/tests/rfc1867_sid_cookie.phpt b/ext/session/tests/rfc1867_sid_cookie.phpt index 804a9ba308..85c28934f4 100644 --- a/ext/session/tests/rfc1867_sid_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_cookie.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-cookie --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-sid-cookie-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-cookie-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -49,7 +49,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-cookie" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_get.phpt b/ext/session/tests/rfc1867_sid_get.phpt index 17d1ebce0f..dfb192cb47 100644 --- a/ext/session/tests/rfc1867_sid_get.phpt +++ b/ext/session/tests/rfc1867_sid_get.phpt @@ -17,13 +17,13 @@ session.save_handler=files --SKIPIF-- --GET-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-get-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -47,7 +47,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-get" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_get_2.phpt b/ext/session/tests/rfc1867_sid_get_2.phpt index 4b32c6e352..33e4489cc8 100644 --- a/ext/session/tests/rfc1867_sid_get_2.phpt +++ b/ext/session/tests/rfc1867_sid_get_2.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests-cookie +PHPSESSID=rfc1867-sid-get-2-cookie --GET-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-get-2 --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-get-2-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -49,7 +49,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-get-2" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_only_cookie.phpt b/ext/session/tests/rfc1867_sid_only_cookie.phpt index 0c376bb026..54897b91c8 100644 --- a/ext/session/tests/rfc1867_sid_only_cookie.phpt +++ b/ext/session/tests/rfc1867_sid_only_cookie.phpt @@ -17,15 +17,15 @@ session.save_handler=files --SKIPIF-- --COOKIE-- -PHPSESSID=rfc1867-tests +PHPSESSID=rfc1867-sid-only-cookie --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-sid-only-cookie-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-only-cookie-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -49,7 +49,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-only-cookie" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/rfc1867_sid_only_cookie_2.phpt b/ext/session/tests/rfc1867_sid_only_cookie_2.phpt index 9b0aae9429..3fd46148d7 100644 --- a/ext/session/tests/rfc1867_sid_only_cookie_2.phpt +++ b/ext/session/tests/rfc1867_sid_only_cookie_2.phpt @@ -16,13 +16,13 @@ session.save_handler=files --SKIPIF-- --GET-- -PHPSESSID=rfc1867-tests-get +PHPSESSID=rfc1867-sid-only-cookie-2-get --POST_RAW-- Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests-post +rfc1867-sid-only-cookie-2-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" diff --git a/ext/session/tests/rfc1867_sid_post.phpt b/ext/session/tests/rfc1867_sid_post.phpt index a126f9ba38..f22f153403 100644 --- a/ext/session/tests/rfc1867_sid_post.phpt +++ b/ext/session/tests/rfc1867_sid_post.phpt @@ -21,7 +21,7 @@ Content-Type: multipart/form-data; boundary=---------------------------208960602 -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHPSESSID" -rfc1867-tests +rfc1867-sid-post -----------------------------20896060251896012921717172737 Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" @@ -45,7 +45,7 @@ var_dump($_SESSION["upload_progress_" . basename(__FILE__)]); session_destroy(); ?> --EXPECTF-- -string(%d) "rfc1867-tests" +string(%d) "rfc1867-sid-post" bool(true) array(2) { ["file1"]=> diff --git a/ext/session/tests/session_basic1.phpt b/ext/session/tests/session_basic1.phpt index ffdcf6c5ec..13c21d3e85 100644 --- a/ext/session/tests/session_basic1.phpt +++ b/ext/session/tests/session_basic1.phpt @@ -17,7 +17,7 @@ ob_start(); echo "*** Testing basic session functionality : variation1 ***\n"; -$session_id = 'testid'; +$session_id = 'session-basic1'; session_id($session_id); $path = __DIR__; var_dump(session_save_path($path)); @@ -47,20 +47,20 @@ ob_end_flush(); *** Testing basic session functionality : variation1 *** string(0) "" *** Without lazy_write *** -string(6) "testid" +string(14) "session-basic1" bool(true) array(1) { ["lazy_write"]=> bool(false) } bool(true) -string(6) "testid" +string(14) "session-basic1" *** With lazy_write *** -string(6) "testid" +string(14) "session-basic1" bool(true) bool(true) -string(6) "testid" +string(14) "session-basic1" *** Cleanup *** -string(6) "testid" +string(14) "session-basic1" bool(true) bool(true) diff --git a/ext/session/tests/session_basic2.phpt b/ext/session/tests/session_basic2.phpt index cb9585303c..68230f89b7 100644 --- a/ext/session/tests/session_basic2.phpt +++ b/ext/session/tests/session_basic2.phpt @@ -19,7 +19,7 @@ ob_start(); echo "*** Testing basic session functionality : variation2 ***\n"; -$session_id = 'testid'; +$session_id = 'session-basic2'; session_id($session_id); $path = __DIR__; var_dump(session_save_path($path)); @@ -55,7 +55,7 @@ ob_end_flush(); *** Testing basic session functionality : variation2 *** string(0) "" *** Without lazy_write *** -string(6) "testid" +string(14) "session-basic2" bool(true) bool(true) bool(true) diff --git a/ext/session/tests/session_basic3.phpt b/ext/session/tests/session_basic3.phpt index f6ed10e296..5f6bd72b82 100644 --- a/ext/session/tests/session_basic3.phpt +++ b/ext/session/tests/session_basic3.phpt @@ -93,7 +93,7 @@ output_reset_rewrite_vars(); echo "*** Test trans sid ***\n"; ob_start(); -$session_id = 'testid'; +$session_id = 'session-basic3'; session_id($session_id); session_start(); // Should add session ID to relative URL only for SECURITY @@ -225,39 +225,39 @@ ob_end_flush(); *** Testing basic session functionality : variation3 use_trans_sid *** *** Test trans sid *** -test -test -test -test -test -test -test -test +test +test +test +test +test +test +test +test -test -test -test -test -test -test +test +test +test +test +test +test -test -test -test -test -test -test -test -test +test +test +test +test +test +test +test +test -test -test -test -test -test -test -test -test +test +test +test +test +test +test +test +test test test @@ -310,19 +310,19 @@ ob_end_flush(); test test - + -
+
-
+
-
+
@@ -341,5 +341,5 @@ ob_end_flush(); bool(true) *** Cleanup *** bool(true) -string(6) "testid" +string(14) "session-basic3" bool(true) diff --git a/ext/session/tests/session_basic5.phpt b/ext/session/tests/session_basic5.phpt index 50e6cde920..6a7511c317 100644 --- a/ext/session/tests/session_basic5.phpt +++ b/ext/session/tests/session_basic5.phpt @@ -24,7 +24,7 @@ ini_set('session.trans_sid_hosts','php.net,example.com'); echo "*** Testing basic session functionality : variation5 use_trans_sid ***\n"; echo "*** Test trans sid ***\n"; -$session_id = 'testid'; +$session_id = 'session-basic5'; session_id($session_id); session_start(); // Should add session ID to allowed hosts only for SECURITY @@ -238,116 +238,116 @@ ob_end_flush(); *** Testing basic session functionality : variation5 use_trans_sid *** *** Test trans sid *** -test -test -test -test -test -test -test -test - -test -test -test -test -test -test - -test -test -test -test -test -test -test -test - -test -test -test -test -test -test -test -test - -test -test -test -test -test -test -test -test -test -test -test -test -test -test -test -test -test - -test -test -test -test -test -test -test -test -test -test -test -test -test -test - -test -test -test -test -test -test -test -test -test -test -test -test -test -test -test -test -test - -
+test +test +test +test +test +test +test +test + +test +test +test +test +test +test + +test +test +test +test +test +test +test +test + +test +test +test +test +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +test +test +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +test +test +test + +test +test +test +test +test +test +test +test +test +test +test +test +test +test +test +test +test + +
-
r +r
-
+
-
+
-
+
-
+
-
+
@@ -436,5 +436,5 @@ ob_end_flush(); bool(true) *** Cleanup *** bool(true) -string(6) "testid" +string(14) "session-basic5" bool(true) diff --git a/ext/session/tests/session_commit_variation4.phpt b/ext/session/tests/session_commit_variation4.phpt index 2633f543af..b0c3ad4a94 100644 --- a/ext/session/tests/session_commit_variation4.phpt +++ b/ext/session/tests/session_commit_variation4.phpt @@ -12,7 +12,7 @@ ob_start(); echo "*** Testing session_commit() : variation ***\n"; var_dump(ini_get('session.use_strict_mode')); -var_dump(session_id("test")); +var_dump(session_id("session-commit-variation4")); var_dump(session_start()); var_dump(session_id()); var_dump(session_commit()); @@ -38,18 +38,18 @@ ob_end_flush(); string(1) "0" string(0) "" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) string(1) "0" -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) -string(4) "test" +string(25) "session-commit-variation4" bool(true) bool(true) string(1) "0" diff --git a/ext/session/tests/session_module_name_variation4.phpt b/ext/session/tests/session_module_name_variation4.phpt index 9b845151a8..7e58ddc6c4 100644 --- a/ext/session/tests/session_module_name_variation4.phpt +++ b/ext/session/tests/session_module_name_variation4.phpt @@ -15,6 +15,8 @@ echo "*** Testing session_module_name() : variation ***\n"; require_once "save_handler.inc"; $path = __DIR__; +$path = __DIR__ . '/session_module_name_variation4'; +@mkdir($path); session_save_path($path); session_module_name("files"); @@ -35,6 +37,7 @@ var_dump($_SESSION); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECT-- *** Testing session_module_name() : variation *** diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt index 8b3df52262..ec22e92051 100644 --- a/ext/session/tests/session_save_path_variation4.phpt +++ b/ext/session/tests/session_save_path_variation4.phpt @@ -14,7 +14,7 @@ ob_start(); echo "*** Testing session_save_path() : variation ***\n"; $initdir = __DIR__; -$sessions = ($initdir."/sessions"); +$sessions = ($initdir."/session_save_path_variation4"); chdir($initdir); @@ -38,7 +38,7 @@ ob_end_flush(); --CLEAN-- --EXPECTF-- diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt index 446a472ab4..3977d0deab 100644 --- a/ext/session/tests/session_save_path_variation5.phpt +++ b/ext/session/tests/session_save_path_variation5.phpt @@ -15,7 +15,7 @@ session.name=PHPSESSID ob_start(); echo "*** Testing session_save_path() : variation ***\n"; $directory = __DIR__; -$sessions = ($directory."/sessions"); +$sessions = ($directory."/session_save_path_variation5"); chdir($directory); ini_set('open_basedir', '.'); @@ -36,7 +36,7 @@ ob_end_flush(); --CLEAN-- --EXPECTF-- diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt index 459f03c825..23865aa512 100644 --- a/ext/session/tests/session_set_save_handler_basic.phpt +++ b/ext/session/tests/session_set_save_handler_basic.phpt @@ -20,7 +20,8 @@ var_dump(session_module_name(FALSE)); var_dump(session_module_name("blah")); var_dump(session_module_name("foo")); -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_basic'; +@mkdir($path); session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "gc"); @@ -55,6 +56,7 @@ session_start(); session_destroy(); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : basic functionality *** diff --git a/ext/session/tests/session_set_save_handler_variation2.phpt b/ext/session/tests/session_set_save_handler_variation2.phpt index 224846466e..a4b7d4df6e 100644 --- a/ext/session/tests/session_set_save_handler_variation2.phpt +++ b/ext/session/tests/session_set_save_handler_variation2.phpt @@ -10,13 +10,15 @@ ob_start(); echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation2'; +@mkdir($path); session_save_path($path); var_dump(session_start()); var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc")); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** diff --git a/ext/session/tests/session_set_save_handler_variation3.phpt b/ext/session/tests/session_set_save_handler_variation3.phpt index be825cbe72..cc0ae1fb23 100644 --- a/ext/session/tests/session_set_save_handler_variation3.phpt +++ b/ext/session/tests/session_set_save_handler_variation3.phpt @@ -12,13 +12,15 @@ ob_start(); echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation3'; +@mkdir($path); var_dump(session_status()); session_save_path($path); var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc")); var_dump(session_destroy()); - ob_end_flush(); + +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** diff --git a/ext/session/tests/session_set_save_handler_variation4.phpt b/ext/session/tests/session_set_save_handler_variation4.phpt index e1b61f29a7..9930f7aaf2 100644 --- a/ext/session/tests/session_set_save_handler_variation4.phpt +++ b/ext/session/tests/session_set_save_handler_variation4.phpt @@ -23,7 +23,8 @@ function noisy_gc($maxlifetime) { } require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation4'; +@mkdir($path); session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "noisy_gc"); @@ -42,13 +43,14 @@ var_dump($_SESSION); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** Open [%s,PHPSESSID] Read [%s,%s] GC [0] -2 deleted +1 deleted array(3) { ["Blah"]=> string(12) "Hello World!" diff --git a/ext/session/tests/session_set_save_handler_variation5.phpt b/ext/session/tests/session_set_save_handler_variation5.phpt index 9860dcc04a..7cf7814259 100644 --- a/ext/session/tests/session_set_save_handler_variation5.phpt +++ b/ext/session/tests/session_set_save_handler_variation5.phpt @@ -24,7 +24,8 @@ function noisy_gc($maxlifetime) { echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation5'; +@mkdir($path); var_dump(session_save_path($path)); echo "*** Without lazy_write ***\n"; @@ -48,6 +49,7 @@ var_dump(session_start()); var_dump(session_destroy()); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : variation *** diff --git a/ext/session/tests/session_set_save_handler_variation6.phpt b/ext/session/tests/session_set_save_handler_variation6.phpt index d65c0dc1c8..11af07f603 100644 --- a/ext/session/tests/session_set_save_handler_variation6.phpt +++ b/ext/session/tests/session_set_save_handler_variation6.phpt @@ -17,7 +17,8 @@ ob_start(); echo "*** Testing session_set_save_handler() : test write short circuit ***\n"; require_once "save_handler.inc"; -$path = __DIR__; +$path = __DIR__ . '/session_set_save_handler_variation6'; +@mkdir($path); session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "gc", "create_sid", "validate_sid", "update"); @@ -53,6 +54,7 @@ session_start(); session_destroy(); ob_end_flush(); +rmdir($path); ?> --EXPECTF-- *** Testing session_set_save_handler() : test write short circuit *** -- cgit v1.2.1