1*49cdfc7eSAndroid Build Coastguard WorkerTEST SUITE: 2*49cdfc7eSAndroid Build Coastguard Worker 3*49cdfc7eSAndroid Build Coastguard WorkerThe directory memcg contains the tests related to memory resource controller. 4*49cdfc7eSAndroid Build Coastguard WorkerThose testcases can reproduce bugs we found. 5*49cdfc7eSAndroid Build Coastguard Worker 6*49cdfc7eSAndroid Build Coastguard WorkerThere are total 44 testcases that have been added. These testcases 7*49cdfc7eSAndroid Build Coastguard Workercontain the regression test, basis operation test and stress test of memctl. 8*49cdfc7eSAndroid Build Coastguard Worker 9*49cdfc7eSAndroid Build Coastguard WorkerNOTE: the test can be run by root only. 10*49cdfc7eSAndroid Build Coastguard Worker 11*49cdfc7eSAndroid Build Coastguard WorkerTESTS AIM: 12*49cdfc7eSAndroid Build Coastguard Worker 13*49cdfc7eSAndroid Build Coastguard WorkerThe aim of the tests is to track any future regressions, test the functionality 14*49cdfc7eSAndroid Build Coastguard Workerof memctl.. 15*49cdfc7eSAndroid Build Coastguard Worker 16*49cdfc7eSAndroid Build Coastguard WorkerFILES DESCRIPTION: 17*49cdfc7eSAndroid Build Coastguard Worker 18*49cdfc7eSAndroid Build Coastguard Workercontrol/memcg_control_test.sh 19*49cdfc7eSAndroid Build Coastguard Worker-------------------- 20*49cdfc7eSAndroid Build Coastguard WorkerThis script runs the testcases of control test. 21*49cdfc7eSAndroid Build Coastguard Worker 22*49cdfc7eSAndroid Build Coastguard Workercontrol/mem_process.c 23*49cdfc7eSAndroid Build Coastguard Worker-------------------- 24*49cdfc7eSAndroid Build Coastguard WorkerThe program allocates memory specified using the '-m' option when 'm' is received 25*49cdfc7eSAndroid Build Coastguard Workerthrough the named pipe /tmp/status_pipe and frees it on receiving 'm' again. 26*49cdfc7eSAndroid Build Coastguard WorkerIt exits on receiving 'x'. It gets the page size on specifying the '-p' option. 27*49cdfc7eSAndroid Build Coastguard Worker 28*49cdfc7eSAndroid Build Coastguard Workerfunctional/memcgroup_function_test.sh 29*49cdfc7eSAndroid Build Coastguard Worker-------------------- 30*49cdfc7eSAndroid Build Coastguard WorkerThis script runs all the 38 testcases of basis operation. 31*49cdfc7eSAndroid Build Coastguard Worker 32*49cdfc7eSAndroid Build Coastguard Workerfunctional/memcgroup_getpagesize.c 33*49cdfc7eSAndroid Build Coastguard Worker-------------------- 34*49cdfc7eSAndroid Build Coastguard WorkerThe program gets page size through getpagesize(). 35*49cdfc7eSAndroid Build Coastguard Worker 36*49cdfc7eSAndroid Build Coastguard Workerfunctional/memcgroup_process.c 37*49cdfc7eSAndroid Build Coastguard Worker-------------------- 38*49cdfc7eSAndroid Build Coastguard WorkerThe program allocates some memory according to the user input when received SIGUSR. 39*49cdfc7eSAndroid Build Coastguard WorkerAnd, it frees all the allocated when received SIGUSR again. 40*49cdfc7eSAndroid Build Coastguard Worker 41*49cdfc7eSAndroid Build Coastguard Workerstress/memcgroup_stress_test.sh 42*49cdfc7eSAndroid Build Coastguard Worker-------------------- 43*49cdfc7eSAndroid Build Coastguard WorkerThis script runs all the 2 testcases of stress test. 44*49cdfc7eSAndroid Build Coastguard Worker 45*49cdfc7eSAndroid Build Coastguard Workerstress/memcgroup_process_stress.c 46*49cdfc7eSAndroid Build Coastguard Worker-------------------- 47*49cdfc7eSAndroid Build Coastguard WorkerThe program allocates some memory in a specified time period when received SIGUSR. 48*49cdfc7eSAndroid Build Coastguard Worker 49*49cdfc7eSAndroid Build Coastguard Workerregression/memcg_regression_test.sh 50*49cdfc7eSAndroid Build Coastguard Worker-------------------- 51*49cdfc7eSAndroid Build Coastguard WorkerThis script runs all the 4 testcases of regression test. 52*49cdfc7eSAndroid Build Coastguard Worker 53*49cdfc7eSAndroid Build Coastguard Workerregression/memcg_test_*.c/sh 54*49cdfc7eSAndroid Build Coastguard Worker-------------------- 55*49cdfc7eSAndroid Build Coastguard WorkerThe programs run each regression test. 56*49cdfc7eSAndroid Build Coastguard Worker 57*49cdfc7eSAndroid Build Coastguard WorkerREADME 58*49cdfc7eSAndroid Build Coastguard Worker------ 59*49cdfc7eSAndroid Build Coastguard WorkerThe one you have gone through. 60