• Home
Name Date Size #Lines LOC

..--

.gitignoreD03-May-2024184 1110

MakefileD03-May-20241.1 KiB336

READMED03-May-20243.1 KiB8462

cpuctl_def_task01.cD03-May-20249.1 KiB241139

cpuctl_def_task02.cD03-May-20249.3 KiB254155

cpuctl_def_task03.cD03-May-20249.2 KiB245145

cpuctl_def_task04.cD03-May-20249.4 KiB255149

cpuctl_latency_check_task.cD03-May-20246 KiB15083

cpuctl_latency_test.cD03-May-20244.4 KiB9942

cpuctl_test01.cD03-May-202410.3 KiB252158

cpuctl_test02.cD03-May-202410.6 KiB281186

cpuctl_test03.cD03-May-20249.4 KiB235147

cpuctl_test04.cD03-May-20249.8 KiB247151

cpuctl_testplan.txtD03-May-20247.8 KiB181143

parameters.shD03-May-20245.9 KiB13777

run_cpuctl_latency_test.shD03-May-20246.6 KiB215134

run_cpuctl_stress_test.shD03-May-202412.7 KiB381291

run_cpuctl_test.shD03-May-202410.6 KiB308237

README

1
2TEST SUITE:
3
4The directory cpuctl contains the tests related to the cpu controller.
5There are total 10 testcases that have been added till date.
6More testcases are expected to be added in future.
7
8TESTS AIM:
9
10The aim of the tests is to test cpu controller functionality.
11
12FILES DESCRIPTION:
13
14cpuctl_testN.c
15---------------
16These are the tasks to run for cpu controller testing.
17The tasks have been automated in the sense that they can assign themselves to
18the appropriate group, can modify their group shares, can migrate etc.
19Each task runs for an interval TIME_INTERVAL seconds and reports the total time
20it could run on all cpus in an interval of INTERVAL seconds. (for convinience
21calculate cpu time is given in % and seconds both).
22A task can call a library routine from libcontrollers library to calculate
23total amount of shares of all the groups, total number of tasks in it's group etc.
24And thus a task knows what is the expected cpu time it should get to run.
25
26After say n SETS it modifies it's parameters and again report the cpu
27usage.
28Maximum effort has been used to reuse the code and keep total code size low.
29
30parameters.sh
31----------
32This file contains the functions which do setup for the test. It creates a
33/dev/cpuctl directory, mounts cgroup filesystem on it with cpu. It then creates
34a number(n) of groups in /dev/cpuctl. The cleanup function does a complete cleanup
35of the system.
36(*However most of the error scenarios have been tested for a sane cleanup, still if
37sometime it is unable to do it justt manualy execute the commands written in cleanup
38function)
39
40run_cpuctl_test.sh
41------------------
42This script creates different scenarios for cpu controller testing and fires (n) tasks
43in different groups to run at the same time. It waits for the return status from
44tasks and reports test pass/fail accordingly.
45
46Makefile
47--------
48
49The usual makefile for this directory
50
51$LTPROOT/output/cpuctl_resultsN.txt
52--------------
53This file will be created to log the results once the test is run. It contains the test
54results which are numbers and following is a description which will help to understand
55the results.
56
57There are two common major expected outcomes of all the tests:
58
591. A group should get cpu time in the same ratio as it's shares.
60
612. This time should not change with the changes in share values while the ratio in those
62   values is same.
63
64The results file are straight forward to read. To keep things very simple just look at
65the two fields calc:- and exp:- in % as below:
66
67CPU TIME{calc:- 60.01(s)i.e.  50.01(%) exp:- 50.00(%)}
68
69PASS/FAIL CRITERIO:
70==================
71A major difference in the two % values is a failure of cpu controller.
72Also the difference between consecutive runs under similar conditions is fail.
73Because of some feature which is not currently developed in kernel it is not
74possible to create an ideal scenario and hence the decision of PASS/FAIL is
75not taken for all the tests at the moment. The statistics is generated in the
76results file and a quick look on it gives a proper understanding.
77
78NOTE: In current scenario a variation of 1-3 % is acceptable.
79
80README:
81--------
82The one you have gone through.
83
84