From d9819967e4848bcc4c22273a7778863da2b3f3f6 Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Tue, 11 Feb 2014 12:41:40 +0100 Subject: Add some memory_limit tests --- tests/executor/memory_limit_64bit.phpt | 43 ++++++++++++++++++++++++++++++ tests/executor/memory_limit_64bit_10G.phpt | 36 +++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 tests/executor/memory_limit_64bit.phpt create mode 100644 tests/executor/memory_limit_64bit_10G.phpt (limited to 'tests/executor') diff --git a/tests/executor/memory_limit_64bit.phpt b/tests/executor/memory_limit_64bit.phpt new file mode 100644 index 0000000..e7529e8 --- /dev/null +++ b/tests/executor/memory_limit_64bit.phpt @@ -0,0 +1,43 @@ +--TEST-- +memory_limit test: set suhosin hard_limit to normal limit (64 bit) +--SKIPIF-- + +--INI-- +memory_limit=16M +suhosin.memory_limit=0 +suhosin.log.syslog=0 +suhosin.log.script=0 +suhosin.log.sapi=2 +--FILE-- + +--EXPECTF-- +13M +14M +15M +16M +ALERT - script tried to increase memory_limit to 17825792 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 6) +16M +ALERT - script tried to increase memory_limit to 18874368 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 7) +16M +ALERT - script tried to increase memory_limit to 2147483648 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 8) +16M +ALERT - script tried to increase memory_limit to 3221225472 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 9) +16M +ALERT - script tried to increase memory_limit to 0 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 10) +16M +ALERT - script tried to increase memory_limit to 1073741824 bytes which is above the allowed value (attacker 'REMOTE_ADDR not set', file '%s', line 11) +16M + diff --git a/tests/executor/memory_limit_64bit_10G.phpt b/tests/executor/memory_limit_64bit_10G.phpt new file mode 100644 index 0000000..284db50 --- /dev/null +++ b/tests/executor/memory_limit_64bit_10G.phpt @@ -0,0 +1,36 @@ +--TEST-- +memory_limit test: set suhosin hard_limit to normal limit (64 bit) - 10 GB +--SKIPIF-- + +--INI-- +memory_limit=10G +suhosin.memory_limit=0 +suhosin.log.syslog=0 +suhosin.log.script=0 +suhosin.log.sapi=2 +--FILE-- + +--EXPECTF-- +13M +14M +15M +16M +17M +18M +2G +3G +4G +5G -- cgit v1.3