From: Rishikesh <ris...@li...> - 2009-12-28 10:46:21
|
Hi All, Current memory controller implelementation in LTP does not check if memory controller is enabled or not. It only check for memory contorller kernel support. It may happen that some distro would have disabled functionality. e.g: mhs21a:/opt/ltp # cat /proc/cgroups | grep -e num_ -e memory -e freezer #subsys_name hierarchy num_cgroups enabled memory 0 1 0 freezer 0 1 1 mhs21a:/opt/ltp # Here 4th parameter shows the exact support for functionality as enabled/disabled. As here clearly it shows that memory controller is disabled and freezer is enabled. My patch supports for this functionality. [PATCH 1/2 ] : Added check for all controller to LTP. [PATCH 2/2 ] : Added check to memory controller functiona,regression & stress testcase scripts. Comments are welcome. It has been tested and here are the result. Without applying patch: =========================================== <<snip>> <<<execution_status>>> initiation_status="ok" duration=124 termination_type=exited termination_id=0 corefile=no cutime=2046 cstime=4111 <<<test_end>>> <<<test_start>>> tag=memcg_regression stime=1261991350 cmdline="memcg_regression_test.sh" contacts="" analysis=exit <<<test_output>>> mount: wrong fs type, bad option, bad superblock on xxx, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so memcg_regression_test 1 TFAIL : failed to mount memory subsytem mount: wrong fs type, bad option, bad superblock on xxx, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so <<snip>> ============================================== And with patch: =========================================== <<snip>> Running tests....... <<<test_start>>> tag=memcg_regression stime=1261996253 cmdline="memcg_regression_test.sh" contacts="" analysis=exit <<<test_output>>> WARNING: Kernel does not support for memory resource controller Skipping all memcgroup testcases.... <<<execution_status>>> initiation_status="ok" duration=0 termination_type=exited termination_id=0 corefile=no cutime=0 cstime=0 <<<test_end>>> <<<test_start>>> tag=memcg_function stime=1261996253 cmdline=" memcg_function_test.sh" contacts="" analysis=exit <<<test_output>>> WARNING: Kernel does not support for memory resource controller Skipping all memcgroup testcases.... <<<execution_status>>> initiation_status="ok" duration=0 termination_type=exited termination_id=0 corefile=no cutime=1 cstime=0 <<<test_end>>> <<<test_start>>> tag=memcg_stress stime=1261996253 cmdline=" memcg_stress_test.sh" contacts="" analysis=exit <<<test_output>>> incrementing stop WARNING: Kernel does not support for memory resource controller Skipping all memcgroup testcases.... <<<execution_status>>> initiation_status="ok" duration=0 termination_type=exited termination_id=0 corefile=no cutime=0 cstime=0 <<<test_end>>> INFO: ltp-pan reported all tests PASS LTP Version: LTP-20091130 <<snip>> ============================================= Thanks Rishi |