diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-05-13 23:31:09 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-05-13 23:31:09 +0200 |
commit | 69d46c3433869728c67589c8f5a2f5738a6cddb3 (patch) | |
tree | 078d145e85bd4a100e36b49423260140c7fadd07 /ext/shmop | |
parent | 50a9f511ccc8946551f8dcb573476e075dce330c (diff) | |
parent | 1892e3abaaecff13e7b124ec4b19c2f23e2d8f69 (diff) | |
download | php-git-69d46c3433869728c67589c8f5a2f5738a6cddb3.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix brittle shmop test
Diffstat (limited to 'ext/shmop')
-rw-r--r-- | ext/shmop/tests/002.phpt | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt index e24f327ee7..f1f084fdbf 100644 --- a/ext/shmop/tests/002.phpt +++ b/ext/shmop/tests/002.phpt @@ -10,37 +10,34 @@ edgarsandi - <edgar.r.sandi@gmail.com> ?> --FILE-- <?php - $hex_shm_id = function(){ - return mt_rand(1338, 9999); - }; echo PHP_EOL, '## shmop_open function tests ##'; // warning outputs: invalid flag when the flags length != 1 - var_dump(shmop_open($hex_shm_id(), '', 0644, 1024)); + var_dump(shmop_open(1338, '', 0644, 1024)); // warning outputs: invalid access mode - var_dump(shmop_open($hex_shm_id(), 'b', 0644, 1024)); + var_dump(shmop_open(1338, 'b', 0644, 1024)); // warning outputs: unable to attach or create shared memory segment var_dump(shmop_open(null, 'a', 0644, 1024)); // warning outputs: Shared memory segment size must be greater than zero - var_dump(shmop_open($hex_shm_id(), "c", 0666, 0)); + var_dump(shmop_open(1338, "c", 0666, 0)); echo PHP_EOL, '## shmop_read function tests ##'; // warning outputs: start is out of range - $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024); + $shm_id = shmop_open(1338, '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); + $shm_id = shmop_open(1339, 'n', 0600, 1024); var_dump(shmop_read($shm_id, 0, -10)); shmop_delete($shm_id); echo PHP_EOL, '## shmop_write function tests ##'; // warning outputs: offset out of range - $shm_id = shmop_open($hex_shm_id(), 'n', 0600, 1024); + $shm_id = shmop_open(1340, 'n', 0600, 1024); var_dump(shmop_write($shm_id, 'text to try write', -10)); shmop_delete($shm_id); ?> |