From 6fa9b76342a924b2438621deba732c270a0d2859 Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Tue, 10 Nov 2015 08:43:37 +0100 Subject: Fix bug #70886 in shmop/tests/002.phpt --- ext/shmop/tests/002.phpt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/shmop') diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt index c67857af08..872fc934fe 100644 --- a/ext/shmop/tests/002.phpt +++ b/ext/shmop/tests/002.phpt @@ -8,14 +8,13 @@ edgarsandi - die('skip not for Windows'); } if (!extension_loaded("shmop")) { - die("skip shmop() extension not available"); } ?> --FILE-- Date: Tue, 10 Nov 2015 09:02:40 +0100 Subject: Split shmop/tests/002.phpt in two (all + non-root) One of the conditions tested was expected to fail with "Permission denied", but it doesn't when running as root. The memory segment was also leaked, hence the split. --- ext/shmop/tests/002.phpt | 6 ------ ext/shmop/tests/003.phpt | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 ext/shmop/tests/003.phpt (limited to 'ext/shmop') diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt index 872fc934fe..3206f90776 100644 --- a/ext/shmop/tests/002.phpt +++ b/ext/shmop/tests/002.phpt @@ -33,9 +33,6 @@ echo PHP_EOL, '## shmop_open function tests ##'; // warning outputs: Shared memory segment size must be greater than zero var_dump(shmop_open($hex_shm_id(), "c", 0666, 0)); - // warning outputs: unable to get shared memory segment information - var_dump(shmop_open($hex_shm_id(), 'n', 0, 1024)); - echo PHP_EOL, '## shmop_read function tests ##'; // warning outputs: 3 parameters expected var_dump(shmop_read()); @@ -88,9 +85,6 @@ bool(false) Warning: shmop_open(): Shared memory segment size must be greater than zero in %s on line %d bool(false) -Warning: shmop_open(): unable to get shared memory segment information 'Permission denied' in %s on line %d -bool(false) - ## shmop_read function tests ## Warning: shmop_read() expects exactly 3 parameters, 0 given in %s on line %d NULL diff --git a/ext/shmop/tests/003.phpt b/ext/shmop/tests/003.phpt new file mode 100644 index 0000000000..1c154f08ca --- /dev/null +++ b/ext/shmop/tests/003.phpt @@ -0,0 +1,33 @@ +--TEST-- +shmop extension error messages (non-root) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +## shmop_open function tests ## + +Warning: shmop_open(): unable to get shared memory segment information 'Permission denied' in %s on line %d +bool(false) -- cgit v1.2.1