A library used to test memcg
A message that is not in the archive (sent off-list or not yet received): [email protected]
Peng Haitao said the following on 2012-1-26 13:58:
Quoted 3 lines
This library includes a set of functions used to test memcg.
Hi, Can you comment or commit the following patch?
Signature · 2 lines
Best Regards, Peng
Quoted 434 lines
Signed-off-by Peng Haitao <[email protected]>--- .../controllers/memcg/functional/memcg_lib.sh | 410 ++++++++++++++++++++ 1 files changed, 410 insertions(+), 0 deletions(-) create mode 100755 testcases/kernel/controllers/memcg/functional/memcg_lib.shtestcases/kernel/controllers/memcg/functional/memcg_lib.sh new file +410
-1@@ -0,0 +1,410 @@ +#! /bin/sh + +################################################################################ +## ## +## Copyright (c) 2012 FUJITSU LIMITED ## +## ## +## This program is free software; you can redistribute it and#or modify ## +## it under the terms of the GNU General Public License as published by ## +## the Free Software Foundation; either version 2 of the License, or ## +## (at your option) any later version. ## +## ## +## This program is distributed in the hope that it will be useful, but ## +## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## +## for more details. ## +## ## +## You should have received a copy of the GNU General Public License ## +## along with this program; if not, write to the Free Software ## +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## +## ## +## Author: Peng Haitao <[email protected]> ## +## ## +################################################################################ + +if [ "x$(grep -w memory /proc/cgroups | cut -f4)" != "x1" ]; then + echo "WARNING:"; + echo "Either Kernel does not support for memory resource controller or feature not enabled"; + echo "Skipping all memcgroup testcases...."; + exit 0 +fi + +cd $LTPROOT/testcases/bin + +TEST_PATH=$PWD +PAGESIZE=`./memcg_getpagesize` +HUGEPAGESIZE=`grep Hugepagesize /proc/meminfo | awk '{ print $2 }'` +[ -z $HUGEPAGESIZE ] && HUGEPAGESIZE=0 +HUGEPAGESIZE=$(( $HUGEPAGESIZE * 1024 )) +PASS=0 +FAIL=1 + +cur_id=0 +failed=0 + +# Record the test result of a test case +# $1 - The result of the test case, $PASS or $FAIL +# $2 - The output information +result() +{ + local pass=$1 + local info="$2" + + if [ $pass -eq $PASS ]; then + tst_resm TPASS "$info" + else + tst_resm TFAIL "$info" + : $(( failed += 1 )) + fi +} + +# Check size in memcg +# $1 - Item name +# $2 - Expected size +check_mem_stat() +{ + if [ -e $1 ]; then + item_size=`cat $1` + else + item_size=`grep -w $1 memory.stat | cut -d " " -f 2` + fi + + if [ "$2" = "$item_size" ]; then + pass=$PASS + else + pass=$FAIL + fi + + result $pass "$1=$item_size/$2" +} + +warmup() +{ + pid=$1 + + echo "Warming up for test: $cur_id, pid: $pid" + kill -s USR1 $pid 2> /dev/null + sleep 1 + kill -s USR1 $pid 2> /dev/null + sleep 1 + + kill -0 $pid + if [ $? -ne 0 ]; then + result $FAIL "cur_id=$cur_id" + return 1 + else + echo "Process is still here after warm up: $pid" + fi + + return 0 +} + +# Run test cases which checks memory.stat after make +# some memory allocation +# $1 - the parameters of 'process', such as --shm +# $2 - the -s parameter of 'process', such as 4096 +# $3 - item name in memory.stat +# $4 - the expected size +# $5 - check after free ? +test_mem_stat() +{ + echo "Running $TEST_PATH/memcg_process $1 -s $2" + $TEST_PATH/memcg_process $1 -s $2 & + sleep 1 + + warmup $! + if [ $? -ne 0 ]; then + return + fi + + echo $! > tasks + kill -s USR1 $! 2> /dev/null + sleep 1 + + check_mem_stat $3 $4 + + kill -s USR1 $! 2> /dev/null + sleep 1 + if [ $5 -eq 1 ]; then + check_mem_stat $3 0 + fi + + kill -s INT $! 2> /dev/null +} + +# Run test cases which checks memory.max_usage_in_bytes after make +# some memory allocation +# $1 - the parameters of 'process', such as --shm +# $2 - the -s parameter of 'process', such as 4096 +# $3 - item name +# $4 - the expected size +# $5 - check after free ? +test_max_usage_in_bytes() +{ + echo "Running $TEST_PATH/memcg_process $1 -s $2" + $TEST_PATH/memcg_process $1 -s $2 & + sleep 1 + + warmup $! + if [ $? -ne 0 ]; then + return + fi + + echo $! > tasks + kill -s USR1 $! 2> /dev/null + sleep 1 + + kill -s USR1 $! 2> /dev/null + sleep 1 + + check_mem_stat $3 $4 + + if [ $5 -eq 1 ]; then + echo 0 > $3 + check_mem_stat $3 0 + fi + + kill -s INT $! 2> /dev/null +} + +# make some memory allocation +# $1 - the parameters of 'process', such as --shm +# $2 - the -s parameter of 'process', such as 4096 +malloc_free_memory() +{ + echo "Running $TEST_PATH/memcg_process $1 -s $2" + $TEST_PATH/memcg_process $1 -s $2 & + sleep 1 + + echo $! > tasks + kill -s USR1 $! 2> /dev/null + sleep 1 + + kill -s USR1 $! 2> /dev/null + sleep 1 + + kill -s INT $! 2> /dev/null +} + +# Test if failcnt > 0, which means page reclamation occured +# $1 - item name in memcg +test_failcnt() +{ + failcnt=`cat $1` + if [ $failcnt -gt 0 ]; then + pass=$PASS + else + pass=$FAIL + fi + + result $pass "$1=$failcnt" +} + +# Test process will be killed due to exceed memory limit +# $1 - the value of memory.limit_in_bytes +# $2 - the parameters of 'process', such as --shm +# $3 - the -s parameter of 'process', such as 4096 +# $4 - use mem+swap limitation +test_proc_kill() +{ + echo $1 > memory.limit_in_bytes + if [ $4 -eq 1 ]; then + if [ -e memory.memsw.limit_in_bytes ]; then + echo $1 > memory.memsw.limit_in_bytes + else + tst_resm TCONF "mem+swap is not enabled" + return + fi + fi + + $TEST_PATH/memcg_process $2 -s $3 & + pid=$! + sleep 1 + echo $pid > tasks + + kill -s USR1 $pid 2> /dev/null + sleep 1 + + ps -p $pid > /dev/null 2> /dev/null + if [ $? -ne 0 ]; then + wait $pid + if [ $? -eq 1 ]; then + result $FAIL "process $pid is killed by error" + else + result $PASS "process $pid is killed" + fi + else + kill -s INT $pid 2> /dev/null + result $FAIL "process $pid is not killed" + fi +} + +# Test limit_in_bytes will be aligned to PAGESIZE +# $1 - user input value +# $2 - expected value +# $3 - use mem+swap limitation +test_limit_in_bytes() +{ + echo $1 > memory.limit_in_bytes + if [ $3 -eq 1 ]; then + if [ -e memory.memsw.limit_in_bytes ]; then + echo $1 > memory.memsw.limit_in_bytes + limit=`cat memory.memsw.limit_in_bytes` + else + tst_resm TCONF "mem+swap is not enabled" + return + fi + else + limit=`cat memory.limit_in_bytes` + fi + + if [ $limit -eq $2 ]; then + result $PASS "input=$1, limit_in_bytes=$limit" + else + result $FAIL "input=$1, limit_in_bytes=$limit" + fi +} + +# Test memory controller doesn't charge hugepage +# $1 - the value of /proc/sys/vm/nr_hugepages +# $2 - the parameters of 'process', --mmap-file or --shm +# $3 - the -s parameter of 'process', such as $HUGEPAGESIZE +# $4 - 0: expected failure, 1: expected success +test_hugepage() +{ + TMP_FILE=$TEST_PATH/tmp + nr_hugepages=`cat /proc/sys/vm/nr_hugepages` + + mkdir /hugetlb + mount -t hugetlbfs none /hugetlb + + echo $1 > /proc/sys/vm/nr_hugepages + + $TEST_PATH/memcg_process $2 --hugepage -s $3 > $TMP_FILE 2>&1 & + sleep 1 + + kill -s USR1 $! 2> /dev/null + sleep 1 + + check_mem_stat "rss" 0 + + echo "TMP_FILE:" + cat $TMP_FILE + + if [ $4 -eq 0 ]; then + test -s $TMP_FILE + if [ $? -eq 0 ]; then + result $PASS "allocate hugepage failed as expected" + else + kill -s USR1 $! 2> /dev/null + kill -s INT $! 2> /dev/null + result $FAIL "allocate hugepage shoud fail" + fi + else + test ! -s $TMP_FILE + if [ $? -eq 0 ]; then + kill -s USR1 $! 2> /dev/null + kill -s INT $! 2> /dev/null + result $PASS "allocate hugepage succeeded" + else + result $FAIL "allocate hugepage failed" + fi + fi + + sleep 1 + rm -rf $TMP_FILE + umount /hugetlb + rmdir /hugetlb + echo $nr_hugepages > /proc/sys/vm/nr_hugepages +} + +# Test the memory charge won't move to subgroup +# $1 - memory.limit_in_bytes in parent group +# $2 - memory.limit_in_bytes in sub group +test_subgroup() +{ + mkdir subgroup + echo $1 > memory.limit_in_bytes + echo $2 > subgroup/memory.limit_in_bytes + + echo "Running $TEST_PATH/memcg_process --mmap-anon -s $PAGESIZE" + $TEST_PATH/memcg_process --mmap-anon -s $PAGESIZE & + sleep 1 + + warmup $! + if [ $? -ne 0 ]; then + return + fi + + echo $! > tasks + kill -s USR1 $! 2> /dev/null + sleep 1 + check_mem_stat "rss" $PAGESIZE + + cd subgroup + echo $! > tasks + check_mem_stat "rss" 0 + + # cleanup + cd .. + echo $! > tasks + kill -s INT $! 2> /dev/null + sleep 1 + rmdir subgroup +} + +# Run test cases which test memory.move_charge_at_immigrate +# $1 - the parameters of 'process', such as --shm +# $2 - the -s parameter of 'process', such as 4096 +# $3 - some positive value, such as 1 +# $4 - the expected size +# $5 - the expected size +test_move_charge() +{ + mkdir subgroup_a + + $TEST_PATH/memcg_process $1 -s $2 & + sleep 1 + warmup $! + if [ $? -ne 0 ]; then + rmdir subgroup_a + return + fi + + echo $! > subgroup_a/tasks + kill -s USR1 $! + sleep 1 + + mkdir subgroup_b + echo $3 > subgroup_b/memory.move_charge_at_immigrate + echo $! > subgroup_b/tasks + + cd subgroup_b + check_mem_stat memory.usage_in_bytes $4 + cd ../subgroup_a + check_mem_stat memory.usage_in_bytes $5 + + cd .. + echo $! > tasks + kill -s USR1 $! + kill -s INT $! + sleep 1 + rmdir subgroup_a subgroup_b +} + +cleanup() +{ + killall -9 memcg_process 2>/dev/null + if [ -e /dev/memcg ]; then + umount /dev/memcg 2>/dev/null + rmdir /dev/memcg 2>/dev/null + fi +} + +do_mount() +{ + cleanup + + mkdir /dev/memcg 2> /dev/null + mount -t cgroup -omemory memcg /dev/memcg +} ------------------------------------------------------------------------------Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Quoted 4 lines
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 8 lines · Peng Haitao
Peng Haitao said the following on 2012-1-26 13:58:
Quoted 3 lines
This library includes a set of functions used to test memcg.
Hi, Can you comment or commit the following patch?
The patch looks good to me. Yet I'm not familiar with this part of codes, so I want to listen to others' opinion if possible.
Also, could you please provide a result log for your updated controller tests?
Thanks,
Caspar
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Caspar Zhang said the following on 2012-2-21 14:14:
Quoted 12 lines
Quoted 5 lines
Quoted 2 lines
This library includes a set of functions used to test memcg.
Hi, Can you comment or commit the following patch?
The patch looks good to me. Yet I'm not familiar with this part of codes, so I want to listen to others' opinion if possible.
Also, could you please provide a result log for your updated controller tests?
Yeah.
[root@RHEL6U1GA-Intel64 ltp]# cat /opt/ltp/runtest/controllers #DESCRIPTION:Resource Management testing
#cgroup cgroup_regression_test.sh
#memcg_regression memcg_regression_test.shmemcg_function memcg_function_test.sh
memcg_max_usage_in_bytes memcg_max_usage_in_bytes_test.sh memcg_move_charge_at_immigrate memcg_move_charge_at_immigrate_test.sh memcg_memsw_limit_in_bytes memcg_memsw_limit_in_bytes_test.sh
memcg_stat memcg_stat_test.shmemcg_use_hierarchy memcg_use_hierarchy_test.shmemcg_usage_in_bytes memcg_usage_in_bytes_test.sh
#memcg_stress memcg_stress_test.sh
#memcg_control PAGESIZE=$(mem_process -p);memcg_control_test.sh $PAGESIZE $PAGESIZE $((PAGESIZE * 2))
#cgroup_fj run_cgroup_test_fj.sh
#controllers test_controllers.sh
[root@RHEL6U1GA-Intel64 ltp]# cat /opt/ltp/results/LTP_RUN_ON-2012_Feb_21-13h_41m_03s.log Test Start Time: Tue Feb 21 13:41:04 2012
-----------------------------------------
Testcase Result Exit Value -------- ------ ---------- memcg_function PASS 0 memcg_max_usage_in_bytes PASS 0 memcg_move_charge_at_immigrate PASS 0 memcg_memsw_limit_in_bytes PASS 0 memcg_stat PASS 0 memcg_use_hierarchy PASS 0 memcg_usage_in_bytes PASS 0
-----------------------------------------------
Total Tests: 7
Total Failures: 0
Kernel Version: 2.6.32-131.0.15.el6.x86_64
Machine Architecture: x86_64
Hostname: RHEL6U1GA-Intel64
The test stdout log can refer to the attached file memcg_test.log.
Thanks.
Signature · 2 lines
Best Regards, Peng
INFO: creating /opt/ltp/results directory
If some fields are empty or look unusual you may have an old version. Compare to the current minimal requirements in Documentation/Changes.
Red Hat Enterprise Linux Server release 6.1 (Santiago)
Red Hat Enterprise Linux Server release 6.1 (Santiago)
Linux RHEL6U1GA-Intel64 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Gnu C gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6) Gnu make 3.81 util-linux ng 2.17.2) mount ng 2.17.2 (with libblkid and selinux support) modutils 3.9 e2fsprogs 1.41.12 PPP 2.4.5 Linux C Library > libc.2.12 Dynamic linker (ldd) 2.12 Procps 3.2.8 Net-tools 1.60 iproute2 iproute2-ss091226 Kbd 1.15 Sh-utils 8.4 Modules Loaded nfs lockd fscache nfs_acl auth_rpcgss veth lzo_decompress lzo_compress ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge stp llc autofs4 sunrpc p4_clockmod freq_table speedstep_lib ipv6 ext3 jbd dm_mirror dm_region_hash dm_log vhost_net macvtap macvlan tun uinput e1000 sg sky2 microcode rfkill wmi serio_raw i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support i6300esb shpchp e752x_edac edac_core ext4 mbcache jbd2 sd_mod crc_t10dif mptspi mptscsih mptbase scsi_transport_spi pata_acpi ata_generic ata_piix dm_mod
free reports:
total used free shared buffers cached
Mem: 2055392 1981172 74220 0 46772 1702056
-/+ buffers/cache: 232344 1823048
Swap: 1048568 0 1048568
/proc/cpuinfo
processor : 0vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 1
cpu MHz : 3000.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yesfpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr
bogomips : 5984.66
clflush size : 64cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 1
cpu MHz : 3000.000
cache size : 1024 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 1
apicid : 6
initial apicid : 6
fpu : yesfpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr
bogomips : 5983.82
clflush size : 64cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 1
cpu MHz : 3000.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yesfpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr
bogomips : 5983.87
clflush size : 64cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.00GHz
stepping : 1
cpu MHz : 3000.000
cache size : 1024 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 1
apicid : 7
initial apicid : 7
fpu : yesfpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr
bogomips : 5983.81
clflush size : 64cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
remove test cases which require the block device.
You can specify it with option -b
COMMAND: /opt/ltp/bin/ltp-pan -e -S -a 7439 -n 7439 -p -f /tmp/ltp-OvPMw6aqH2/alltests -l /opt/ltp/results/LTP_RUN_ON-2012_Feb_21-13h_41m_03s.log -C /opt/ltp/output/LTP_RUN_ON-2012_Feb_21-13h_41m_03s.failed
LOG File: /opt/ltp/results/LTP_RUN_ON-2012_Feb_21-13h_41m_03s.log FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-2012_Feb_21-13h_41m_03s.failed Running tests.......
<<<test_start>>>
tag=memcg_function stime=1329802864
cmdline=" memcg_function_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4096 Warming up for test: 1, pid: 7562
Process is still here after warm up: 7562memcg_function_test 1 TPASS : rss=4096/4096
Running /opt/ltp/testcases/bin/memcg_process --mmap-file -s 4096 Warming up for test: 2, pid: 7581
Process is still here after warm up: 7581memcg_function_test 2 TPASS : rss=0/0
Running /opt/ltp/testcases/bin/memcg_process --shm -k 3 -s 4096 Warming up for test: 3, pid: 7600
Process is still here after warm up: 7600memcg_function_test 3 TPASS : rss=0/0
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon --mmap-file --shm -s 4096 Warming up for test: 4, pid: 7619
Process is still here after warm up: 7619memcg_function_test 4 TPASS : rss=4096/4096
Running /opt/ltp/testcases/bin/memcg_process --mmap-lock1 -s 4096 Warming up for test: 5, pid: 7638
Process is still here after warm up: 7638memcg_function_test 5 TPASS : rss=4096/4096
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4096 Warming up for test: 6, pid: 7657
Process is still here after warm up: 7657
memcg_function_test 6 TPASS : rss=4096/4096 memcg_function_test 6 TPASS : rss=0/0 Running /opt/ltp/testcases/bin/memcg_process --mmap-file -s 4096 Warming up for test: 7, pid: 7681 Process is still here after warm up: 7681 memcg_function_test 7 TPASS : rss=0/0 memcg_function_test 7 TPASS : rss=0/0 Running /opt/ltp/testcases/bin/memcg_process --shm -k 8 -s 4096 Warming up for test: 8, pid: 7710 Process is still here after warm up: 7710 memcg_function_test 8 TPASS : rss=0/0 memcg_function_test 8 TPASS : rss=0/0 Running /opt/ltp/testcases/bin/memcg_process --mmap-anon --mmap-file --shm -s 4096 Warming up for test: 9, pid: 7733 Process is still here after warm up: 7733 memcg_function_test 9 TPASS : rss=4096/4096 memcg_function_test 9 TPASS : rss=0/0 Running /opt/ltp/testcases/bin/memcg_process --mmap-lock1 -s 4096 Warming up for test: 10, pid: 7756 Process is still here after warm up: 7756 memcg_function_test 10 TPASS : rss=4096/4096 memcg_function_test 10 TPASS : rss=0/0
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 8192
./memcg_lib.sh: line 174: 7780 Killed $TEST_PATH/memcg_process $1 -s $2memcg_function_test 11 TPASS : memory.failcnt=6
Running /opt/ltp/testcases/bin/memcg_process --mmap-file -s 8192
./memcg_lib.sh: line 174: 7795 Killed $TEST_PATH/memcg_process $1 -s $2memcg_function_test 12 TPASS : memory.failcnt=6
Running /opt/ltp/testcases/bin/memcg_process --shm -s 8192
./memcg_lib.sh: line 174: 7810 Killed $TEST_PATH/memcg_process $1 -s $2memcg_function_test 13 TPASS : memory.failcnt=6
./memcg_lib.sh: line 209: 7825 Killed $TEST_PATH/memcg_process $2 -s $3memcg_function_test 14 TPASS : process 7825 is killed
./memcg_lib.sh: line 209: 7839 Killed $TEST_PATH/memcg_process $2 -s $3memcg_function_test 15 TPASS : process 7839 is killed
./memcg_lib.sh: line 209: 7855 Killed $TEST_PATH/memcg_process $2 -s $3memcg_function_test 16 TPASS : process 7855 is killed
./memcg_lib.sh: line 209: 7876 Killed $TEST_PATH/memcg_process $2 -s $3memcg_function_test 17 TPASS : process 7876 is killed
./memcg_lib.sh: line 209: 7896 Killed $TEST_PATH/memcg_process $2 -s $3memcg_function_test 18 TPASS : process 7896 is killed
./memcg_lib.sh: line 209: 7916 Killed $TEST_PATH/memcg_process $2 -s $3memcg_function_test 19 TPASS : process 7916 is killed
./memcg_lib.sh: line 209: 7930 Killed $TEST_PATH/memcg_process $2 -s $3memcg_function_test 20 TPASS : process 7930 is killed
./memcg_lib.sh: line 209: 7944 Killed $TEST_PATH/memcg_process $2 -s $3
memcg_function_test 21 TPASS : process 7944 is killed memcg_function_test 22 TPASS : input=4095, limit_in_bytes=4096 memcg_function_test 23 TPASS : input=4097, limit_in_bytes=8192 memcg_function_test 24 TPASS : input=1, limit_in_bytes=4096 memcg_function_test 25 TPASS : return value is 0 memcg_function_test 26 TPASS : return value is 1 memcg_function_test 27 TPASS : return value is 1 memcg_function_test 28 TPASS : return value is 1 memcg_function_test 29 TPASS : force memory succeeded memcg_function_test 30 TPASS : force memory failed as expected memcg_function_test 31 TPASS : return value is 0 memcg_function_test 32 TPASS : return value is 0 memcg_function_test 33 TPASS : return value is 0 memcg_function_test 34 TPASS : return value is 0 memcg_function_test 35 TPASS : return value is 1 Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4096 Warming up for test: 36, pid: 8116 Process is still here after warm up: 8116 memcg_function_test 36 TPASS : rss=4096/4096 memcg_function_test 36 TPASS : rss=0/0 Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4096 Warming up for test: 37, pid: 8141 Process is still here after warm up: 8141 memcg_function_test 37 TPASS : rss=4096/4096 memcg_function_test 37 TPASS : rss=0/0 Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4096 Warming up for test: 38, pid: 8166 Process is still here after warm up: 8166 memcg_function_test 38 TPASS : rss=4096/4096 memcg_function_test 38 TPASS : rss=0/0
<<<execution_status>>>
initiation_status="ok"
duration=136 termination_type=exited termination_id=0 corefile=no cutime=46 cstime=185
<<<test_end>>>
<<<test_start>>>
tag=memcg_max_usage_in_bytes stime=1329803000 cmdline="memcg_max_usage_in_bytes_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4194304 Warming up for test: 1, pid: 8200
Process is still here after warm up: 8200memcg_max_usage_in_bytes_test 1 TPASS : memory.max_usage_in_bytes=4194304/4194304
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4194304 Warming up for test: 2, pid: 8218
Process is still here after warm up: 8218memcg_max_usage_in_bytes_test 2 TPASS : memory.memsw.max_usage_in_bytes=4194304/4194304
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4194304 Warming up for test: 3, pid: 8235
Process is still here after warm up: 8235
memcg_max_usage_in_bytes_test 3 TPASS : memory.max_usage_in_bytes=4194304/4194304 memcg_max_usage_in_bytes_test 3 TPASS : memory.max_usage_in_bytes=0/0 Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4194304 Warming up for test: 4, pid: 8254 Process is still here after warm up: 8254 memcg_max_usage_in_bytes_test 4 TPASS : memory.memsw.max_usage_in_bytes=4194304/4194304 memcg_max_usage_in_bytes_test 4 TPASS : memory.memsw.max_usage_in_bytes=0/0
<<<execution_status>>>
initiation_status="ok"
duration=24 termination_type=exited termination_id=0 corefile=no cutime=6 cstime=27
<<<test_end>>>
<<<test_start>>>
tag=memcg_move_charge_at_immigrate stime=1329803024 cmdline="memcg_move_charge_at_immigrate_test.sh" contacts=""
analysis=exit
<<<test_output>>>
Warming up for test: 1, pid: 8290
Process is still here after warm up: 8290
memcg_move_charge_at_immigrate_test 1 TPASS : memory.usage_in_bytes=0/0 memcg_move_charge_at_immigrate_test 1 TPASS : memory.usage_in_bytes=4096/4096 Warming up for test: 2, pid: 8312 Process is still here after warm up: 8312 memcg_move_charge_at_immigrate_test 2 TPASS : memory.usage_in_bytes=4096/4096 memcg_move_charge_at_immigrate_test 2 TPASS : memory.usage_in_bytes=8192/8192 Warming up for test: 3, pid: 8334 Process is still here after warm up: 8334 memcg_move_charge_at_immigrate_test 3 TPASS : memory.usage_in_bytes=8192/8192 memcg_move_charge_at_immigrate_test 3 TPASS : memory.usage_in_bytes=4096/4096 Warming up for test: 4, pid: 8356 Process is still here after warm up: 8356 memcg_move_charge_at_immigrate_test 4 TPASS : memory.usage_in_bytes=8192/8192 memcg_move_charge_at_immigrate_test 4 TPASS : memory.usage_in_bytes=0/0
<<<execution_status>>>
initiation_status="ok"
duration=25 termination_type=exited termination_id=0 corefile=no cutime=7 cstime=21
<<<test_end>>>
<<<test_start>>>
tag=memcg_memsw_limit_in_bytes stime=1329803049 cmdline="memcg_memsw_limit_in_bytes_test.sh" contacts=""
analysis=exit
<<<test_output>>>
./memcg_lib.sh: line 209: 8388 Killed $TEST_PATH/memcg_process $2 -s $3memcg_memsw_limit_in_bytes_test 1 TPASS : process 8388 is killed
./memcg_lib.sh: line 209: 8402 Killed $TEST_PATH/memcg_process $2 -s $3memcg_memsw_limit_in_bytes_test 2 TPASS : process 8402 is killed
./memcg_lib.sh: line 209: 8416 Killed $TEST_PATH/memcg_process $2 -s $3memcg_memsw_limit_in_bytes_test 3 TPASS : process 8416 is killed
./memcg_lib.sh: line 209: 8430 Killed $TEST_PATH/memcg_process $2 -s $3memcg_memsw_limit_in_bytes_test 4 TPASS : process 8430 is killed
./memcg_lib.sh: line 209: 8444 Killed $TEST_PATH/memcg_process $2 -s $3
memcg_memsw_limit_in_bytes_test 5 TPASS : process 8444 is killed memcg_memsw_limit_in_bytes_test 6 TPASS : input=4095, limit_in_bytes=4096 memcg_memsw_limit_in_bytes_test 7 TPASS : input=4097, limit_in_bytes=8192 memcg_memsw_limit_in_bytes_test 8 TPASS : input=1, limit_in_bytes=4096 memcg_memsw_limit_in_bytes_test 9 TPASS : return value is 0 memcg_memsw_limit_in_bytes_test 10 TPASS : return value is 1 memcg_memsw_limit_in_bytes_test 11 TPASS : return value is 1 memcg_memsw_limit_in_bytes_test 12 TPASS : return value is 1
<<<execution_status>>>
initiation_status="ok"
duration=23 termination_type=exited termination_id=0 corefile=no cutime=12 cstime=47
<<<test_end>>>
<<<test_start>>>
tag=memcg_stat stime=1329803072 cmdline="memcg_stat_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
Running /opt/ltp/testcases/bin/memcg_process --shm -k 3 -s 4096 Warming up for test: 1, pid: 8542
Process is still here after warm up: 8542memcg_stat_test 1 TPASS : cache=4096/4096
Running /opt/ltp/testcases/bin/memcg_process --mmap-file -s 4096 Warming up for test: 2, pid: 8562
Process is still here after warm up: 8562memcg_stat_test 2 TPASS : mapped_file=4096/4096
Running /opt/ltp/testcases/bin/memcg_process --mmap-lock1 -s 4096 Warming up for test: 3, pid: 8587
Process is still here after warm up: 8587memcg_stat_test 3 TPASS : unevictable=4096/4096
Running /opt/ltp/testcases/bin/memcg_process --mmap-lock2 -s 4096 Warming up for test: 4, pid: 8606
Process is still here after warm up: 8606
memcg_stat_test 4 TPASS : unevictable=4096/4096 memcg_stat_test 5 TPASS : hierarchical_memory_limit=4096/4096 memcg_stat_test 6 TPASS : hierarchical_memory_limit=8192/8192 memcg_stat_test 7 TPASS : hierarchical_memsw_limit=4096/4096 memcg_stat_test 8 TPASS : hierarchical_memsw_limit=8192/8192
<<<execution_status>>>
initiation_status="ok"
duration=29 termination_type=exited termination_id=0 corefile=no cutime=9 cstime=33
<<<test_end>>>
<<<test_start>>>
tag=memcg_use_hierarchy stime=1329803101 cmdline="memcg_use_hierarchy_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
./memcg_lib.sh: line 209: 8696 Killed $TEST_PATH/memcg_process $2 -s $3
memcg_use_hierarchy_test 1 TPASS : process 8696 is killed memcg_use_hierarchy_test 2 TPASS : return value is 1 memcg_use_hierarchy_test 3 TPASS : return value is 1
<<<execution_status>>>
initiation_status="ok"
duration=5 termination_type=exited termination_id=0 corefile=no cutime=4 cstime=13
<<<test_end>>>
<<<test_start>>>
tag=memcg_usage_in_bytes stime=1329803106 cmdline="memcg_usage_in_bytes_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4194304 Warming up for test: 1, pid: 8745
Process is still here after warm up: 8745memcg_usage_in_bytes_test 1 TPASS : memory.usage_in_bytes=4194304/4194304
Running /opt/ltp/testcases/bin/memcg_process --mmap-anon -s 4194304 Warming up for test: 2, pid: 8762
Process is still here after warm up: 8762memcg_usage_in_bytes_test 2 TPASS : memory.memsw.usage_in_bytes=4194304/4194304
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=12 termination_type=exited termination_id=0 corefile=no cutime=3 cstime=11
<<<test_end>>>
INFO: ltp-pan reported all tests PASS
LTP Version: 20120104-68-g2e2f72a
###############################################################"
Done executing testcases."
LTP Version: 20120104-68-g2e2f72a
###############################################################"------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 5 lines
Quoted 3 lines
This library includes a set of functions used to test memcg.
hi, anyone can comment the patch?
Sorry for the delay.
Generally the code looks good, I guess we could merge this and wait for feedback from testers or has anybody any objections?
Signature · 12 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 3 lines
Sure, agree. Please merge this. :)
Hmm, somehow these patches fail to apply on latest git
...
Applying: A library used to test memcg
Applying: Modify memcg_function_test.sh to use lib
error: patch failed:testcases/kernel/controllers/memcg/functional/memcg_function_test.sh:25 error:testcases/kernel/controllers/memcg/functional/memcg_function_test.sh:
patch does not apply
Patch failed at 0002 Modify memcg_function_test.sh to use lib When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".
...
Signature · 12 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list