com php-src: add test: ext/sysvshm/tests/shutdown_crash_0 .phpt

From: Date: Tue, 22 Sep 2015 18:45:52 +0000
Subject: com php-src: add test: ext/sysvshm/tests/shutdown_crash_0 .phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89116@lists.php.net to get a copy of this message
Commit: a490485893182ad516d82092c62dfde43358cabd Author: Anatol Belski <ab@php.net> Tue, 22 Sep 2015 16:25:13 +0200 Parents: faa50318a39503e65acf3958e0c10698f5c6f80f Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a490485893182ad516d82092c62dfde43358cabd Log: add test Changed paths: A ext/sysvshm/tests/shutdown_crash_0.phpt Diff: diff --git a/ext/sysvshm/tests/shutdown_crash_0.phpt b/ext/sysvshm/tests/shutdown_crash_0.phpt new file mode 100644 index 0000000..c547c7e --- /dev/null +++ b/ext/sysvshm/tests/shutdown_crash_0.phpt @@ -0,0 +1,22 @@ +--TEST-- +Shutdown crash when attached/removed same key segment multiple times +--SKIPIF-- +<?php +if (!extension_loaded("sysvshm")){ print 'skip'; } +?> +--FILE-- +<?php + +/*$key = ftok(__FILE__, 't'); +var_dump($key);*/ +$key = 42; + +var_dump($s = shm_attach($key, 1024)); +shm_remove($s); +var_dump($s = shm_attach($key, 1024)); +shm_remove($s); + +--EXPECTF-- +resource(%d) of type (sysvshm) +resource(%d) of type (sysvshm) +

« previous php.cvs (#89116) next »