xref: /aosp_15_r20/external/ltp/testcases/kernel/controllers/memctl/README (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard WorkerTEST SUITE:
2*49cdfc7eSAndroid Build Coastguard Worker
3*49cdfc7eSAndroid Build Coastguard WorkerThe directory memctl contains the tests related to memory controller.
4*49cdfc7eSAndroid Build Coastguard WorkerMore testcases are expected to be added in future.
5*49cdfc7eSAndroid Build Coastguard Worker
6*49cdfc7eSAndroid Build Coastguard WorkerTESTS AIM:
7*49cdfc7eSAndroid Build Coastguard Worker
8*49cdfc7eSAndroid Build Coastguard WorkerThe aim of the tests is to test memory controller functionality.
9*49cdfc7eSAndroid Build Coastguard Worker
10*49cdfc7eSAndroid Build Coastguard WorkerFILES DESCRIPTION:
11*49cdfc7eSAndroid Build Coastguard Worker
12*49cdfc7eSAndroid Build Coastguard Workermemctl_testN.c
13*49cdfc7eSAndroid Build Coastguard Worker---------------
14*49cdfc7eSAndroid Build Coastguard WorkerThese are the tasks to run for memory controller testing.
15*49cdfc7eSAndroid Build Coastguard WorkerThe tasks have been automated in the sense that they can assign themselves
16*49cdfc7eSAndroid Build Coastguard Workerto the appropriate group, can migrate to another group etc.
17*49cdfc7eSAndroid Build Coastguard WorkerMaximum effort has been made to reuse the code and keep total code size low.
18*49cdfc7eSAndroid Build Coastguard Worker
19*49cdfc7eSAndroid Build Coastguard Workermyfunctions.sh
20*49cdfc7eSAndroid Build Coastguard Worker----------
21*49cdfc7eSAndroid Build Coastguard WorkerThis file contains the functions which are common for all the tests. For ex.
22*49cdfc7eSAndroid Build Coastguard Workerthe setup and cleanup functions which do the setup for running the test and do
23*49cdfc7eSAndroid Build Coastguard Workerthe cleanup once the test finishes. The setup() function creates /dev/memctl
24*49cdfc7eSAndroid Build Coastguard Workerdirectory and mounts cgroup filesystem on it with memory controller. It then
25*49cdfc7eSAndroid Build Coastguard Workercreates a number(n) of groups in /dev/memctl. The cleanup function does a
26*49cdfc7eSAndroid Build Coastguard Workercomplete cleanup of the system.
27*49cdfc7eSAndroid Build Coastguard Worker
28*49cdfc7eSAndroid Build Coastguard WorkerMost of the error scenarios have been taken care of for a sane cleanup of the
29*49cdfc7eSAndroid Build Coastguard Workersystem. However if cleanup fails in any case, just manually execute the
30*49cdfc7eSAndroid Build Coastguard Workercommands written in cleanup function in myfunctions.sh.
31*49cdfc7eSAndroid Build Coastguard WorkerOne of the most common causes of failed cleanup is that you have done cd into
32*49cdfc7eSAndroid Build Coastguard Workerany of the groups in controller dir tree.
33*49cdfc7eSAndroid Build Coastguard Worker
34*49cdfc7eSAndroid Build Coastguard Workerrun_memctl_test.sh
35*49cdfc7eSAndroid Build Coastguard Worker------------------
36*49cdfc7eSAndroid Build Coastguard WorkerThis script creates different scenarios for memory controller testing and
37*49cdfc7eSAndroid Build Coastguard Workerfires (n) tasks in different groups to do some memory allocations etc. It
38*49cdfc7eSAndroid Build Coastguard Workerwaits for the return status from tasks and reports test pass/fail accordingly.
39*49cdfc7eSAndroid Build Coastguard Worker
40*49cdfc7eSAndroid Build Coastguard WorkerMakefile
41*49cdfc7eSAndroid Build Coastguard Worker--------
42*49cdfc7eSAndroid Build Coastguard Worker
43*49cdfc7eSAndroid Build Coastguard WorkerThe usual makefile for this directory
44*49cdfc7eSAndroid Build Coastguard Worker
45*49cdfc7eSAndroid Build Coastguard WorkerPASS/FAIL CRITERION:
46*49cdfc7eSAndroid Build Coastguard Worker==================
47*49cdfc7eSAndroid Build Coastguard WorkerThe test cases are intelligent enough in deciding the pass or failure of a
48*49cdfc7eSAndroid Build Coastguard Workertest.
49*49cdfc7eSAndroid Build Coastguard Worker
50*49cdfc7eSAndroid Build Coastguard WorkerREADME:
51*49cdfc7eSAndroid Build Coastguard Worker--------
52*49cdfc7eSAndroid Build Coastguard WorkerThe one you have gone through.
53*49cdfc7eSAndroid Build Coastguard Worker
54