New testcase added by Naufal.

These are the testcases I plan to implement (taken from
http://workouts.foss.in/2009/index.php/Hacking_Linux_Kernel_Through_testing)

1. Validate the upper limit imposed by the topmost hierarchy.

2. Test the testcase no 1 for subgroups far below in hierarchy.

3. A group has n siblings. They start consuming memory and the total
increases to more than parent's limit. Check if the group with max memory
consumption gets it's task killed.

4. Write a test which uses lots of memory, reaches swap limits and ensure it
gets killed.

5. A task is running in a group which has a limit N on memory.limit_in_bytes
but no limit on memory.memsw.limit_in_bytes. The system has swap memory in
use and the task's memory consumption is >> N. Therefore the task should be
using a big amount of swap memory(say M) > N. Try to set the
memory.memsw.limit_in_bytes to a low value say N. It should fail to change
the limits.

6. In test no 5 instead of changing the mem+swap limits turn the swap off.
Since the memory usage of the task is more than the current limits the task
should be killed.

The first testcase has been attached. Reimplemented using named pipes.

Naufal

Signed-off-by Mohamed Naufal Basheer <naufal11@gmail.com>
5 files changed