com php-src: Fix bug #70886 in shmop/tests/002.phpt: ext/shmop/tests/002.phpt

From: Date: Tue, 10 Nov 2015 08:10:10 +0000
Subject: com php-src: Fix bug #70886 in shmop/tests/002.phpt: ext/shmop/tests/002.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89726@lists.php.net to get a copy of this message
Commit: 6fa9b76342a924b2438621deba732c270a0d2859 Author: Matteo Beccati <mbeccati@php.net> Tue, 10 Nov 2015 08:43:37 +0100 Parents: 4803914ae69645f85f9201fab6978ab37ff1602e Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6fa9b76342a924b2438621deba732c270a0d2859 Log: Fix bug #70886 in shmop/tests/002.phpt Bugs: https://bugs.php.net/70886 Changed paths: M ext/shmop/tests/002.phpt Diff: diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt index c67857a..872fc93 100644 --- a/ext/shmop/tests/002.phpt +++ b/ext/shmop/tests/002.phpt @@ -8,14 +8,13 @@ edgarsandi - <edgar.r.sandi@gmail.com> die('skip not for Windows'); } if (!extension_loaded("shmop")) { - die("skip shmop() extension not available"); } ?> --FILE-- <?php $hex_shm_id = function(){ - return rand(0, 9999); + return mt_rand(1338, 9999); }; echo PHP_EOL, '## shmop_open function tests ##'; @@ -44,10 +43,12 @@ echo PHP_EOL, '## shmop_read function tests ##'; // warning outputs: start is out of range $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024); var_dump(shmop_read($shm_id, -10, 0)); + shmop_delete($shm_id); // warning outputs: count is out of range $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024); var_dump(shmop_read($shm_id, 0, -10)); + shmop_delete($shm_id); echo PHP_EOL, '## shmop_write function tests ##'; // warning outputs: 3 parameters expected @@ -56,6 +57,7 @@ echo PHP_EOL, '## shmop_write function tests ##'; // warning outputs: offset out of range $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024); var_dump(shmop_write($shm_id, 'text to try write', -10)); + shmop_delete($shm_id); echo PHP_EOL, '## shmop_size function tests ##'; // warning outputs: 1 parameter expected

« previous php.cvs (#89726) next »