History log of /external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
107ee820fa2e310c1948607f316df4d20825c24b 05-Sep-2016 Cyril Hrubis <chrubis@suse.cz> memcg_control_test.sh: Simplify runtest file

This commit makes use of $(getconf PAGESIZE) instead of the mem_process
and also moves the parameters to the test itself as there is no need to
keep these outside the script.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
bc6d0f707d87b50e69e622a42ccf265753182d55 20-Jul-2015 Vladimir Davydov <vdavydov@parallels.com> memcg_control: fix mem_process not moved to cgroup

$! is not set after ( cmd & )

This bug was introduced by commit 49010e502a74c ("Replace pushd // popd
with cd calls.").

Since we create a sub-shell in test_proc_kill only to preserve PWD,
let's change this to cd $OLDPWD. In contrast to pushd/popd this will
work in busybox.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
1e5da030e9cdeb431d41e7eb84658d9c4a5b67e3 17-Oct-2013 Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> memcg_control: revert memory.use_hierarchy value to 0

Documentation/cgroups/memory.txt states that "Enabling/disabling will
fail if either the cgroup already has other cgroups created below it,
or if the parent cgroup has use_hierarchy enabled."

memcg_control_test.sh sets global memory.use_hierarchy value to 1 before
the execution of its own tests but doesn't revert it back to 0 after
they complete.

It causes failures of memcg_stat_test.sh and memcg_use_hierarchy_test.sh
testcases if runtest/controllers is run twice on the same host.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
4548c6cf9bcdd96d8303caa4130ab638b61f8a30 19-Oct-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> Update FSF address

find . -type f -exec sed -i 's/675 Mass Ave, Cambridge, MA 02139, USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/g' {} \;
find . -type f -exec sed -i 's/59 Temple Place, Suite 330, Boston, MA 02111-1307 USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/g' {} \;

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
37550cf5a86c7ca7424a2a318dd64e550f13f5df 18-Oct-2012 Chris Dearman <chris@mips.com> Remove whitespace at end of line

This is a scripted change done using the following command:

find . -type d -name .git -prune -o \
-type f \! -name \*\~ \! -name .\#\* \
\! -name \*.gz \! -name \*.pdf \! -name \*.patch -print0 | \
xargs -0 sed -i -e 's/[\t ]*$//'

Signed-off-by: Chris Dearman <chris@mips.com>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
007dce57f645ad796f8cb60a13de936ac04fd1e8 11-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Hi,

I found following problem about "memcg_control" test.
---------
/opt/ltp/testcases/bin/memcg_control_test.sh: line 30: [: : integer
expression expected
----------

This happens because of following process.
[ memcg_control_test.sh: line 30 ]
---------
if [ "$(grep -w memory /proc/cgroups | cut -f4)" -ne "1" ]; then
echo "WARNING:"
echo "Either kernel does not support memory resource controller or
feature not ena
bled"
echo "Skipping all memcg_control testcases...."
exit 0
fi
---------

"$(grep -w memory /proc/cgroups | cut -f4)" can't comparable with "1"
if "$(grep -w memory /proc/cgroups | cut -f4)" = nothing.

How about fixing like the other "memcg" tests?

Signed-off-by: Yuki Yao<y_yao@ryobi.co.jp>
Acked-by: Garrett Cooper <yanegomi@gmail.com>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
49010e502a74cb6461fe9c64c90dd878c8edd398 08-Mar-2010 Garrett Cooper <yanegomi@gmail.com> Replace pushd // popd with cd calls.

Busybox doesn't have a concept of the pushd // popd builtins available in bash and tcsh, so let's convert the calls to cd. This is just something I noticed after executing this test, and I know there are other locations that need to be cleaned up like this in the tree...

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
c0b8157365beb18a627fe197be6ab111e8281e86 01-Mar-2010 Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> 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>
/external/ltp/testcases/kernel/controllers/memcg/control/memcg_control_test.sh