1f08c3bdfSopenharmony_ciTEST SUITE:
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ciThe directory memctl contains the tests related to memory controller.
4f08c3bdfSopenharmony_ciMore testcases are expected to be added in future.
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_ciTESTS AIM:
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ciThe aim of the tests is to test memory controller functionality.
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_ciFILES DESCRIPTION:
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_cimemctl_testN.c
13f08c3bdfSopenharmony_ci---------------
14f08c3bdfSopenharmony_ciThese are the tasks to run for memory controller testing.
15f08c3bdfSopenharmony_ciThe tasks have been automated in the sense that they can assign themselves
16f08c3bdfSopenharmony_cito the appropriate group, can migrate to another group etc.
17f08c3bdfSopenharmony_ciMaximum effort has been made to reuse the code and keep total code size low.
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_cimyfunctions.sh
20f08c3bdfSopenharmony_ci----------
21f08c3bdfSopenharmony_ciThis file contains the functions which are common for all the tests. For ex.
22f08c3bdfSopenharmony_cithe setup and cleanup functions which do the setup for running the test and do
23f08c3bdfSopenharmony_cithe cleanup once the test finishes. The setup() function creates /dev/memctl
24f08c3bdfSopenharmony_cidirectory and mounts cgroup filesystem on it with memory controller. It then
25f08c3bdfSopenharmony_cicreates a number(n) of groups in /dev/memctl. The cleanup function does a
26f08c3bdfSopenharmony_cicomplete cleanup of the system.
27f08c3bdfSopenharmony_ci
28f08c3bdfSopenharmony_ciMost of the error scenarios have been taken care of for a sane cleanup of the
29f08c3bdfSopenharmony_cisystem. However if cleanup fails in any case, just manually execute the
30f08c3bdfSopenharmony_cicommands written in cleanup function in myfunctions.sh.
31f08c3bdfSopenharmony_ciOne of the most common causes of failed cleanup is that you have done cd into
32f08c3bdfSopenharmony_ciany of the groups in controller dir tree.
33f08c3bdfSopenharmony_ci
34f08c3bdfSopenharmony_cirun_memctl_test.sh
35f08c3bdfSopenharmony_ci------------------
36f08c3bdfSopenharmony_ciThis script creates different scenarios for memory controller testing and
37f08c3bdfSopenharmony_cifires (n) tasks in different groups to do some memory allocations etc. It
38f08c3bdfSopenharmony_ciwaits for the return status from tasks and reports test pass/fail accordingly.
39f08c3bdfSopenharmony_ci
40f08c3bdfSopenharmony_ciMakefile
41f08c3bdfSopenharmony_ci--------
42f08c3bdfSopenharmony_ci
43f08c3bdfSopenharmony_ciThe usual makefile for this directory
44f08c3bdfSopenharmony_ci
45f08c3bdfSopenharmony_ciPASS/FAIL CRITERION:
46f08c3bdfSopenharmony_ci==================
47f08c3bdfSopenharmony_ciThe test cases are intelligent enough in deciding the pass or failure of a
48f08c3bdfSopenharmony_citest.
49f08c3bdfSopenharmony_ci
50f08c3bdfSopenharmony_ciREADME:
51f08c3bdfSopenharmony_ci--------
52f08c3bdfSopenharmony_ciThe one you have gone through.
53f08c3bdfSopenharmony_ci
54