Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / resctrl / README
blob8d11ce7c2ee50d85ac4e333093cbf1b5b319c9cf
1 resctrl_tests - resctrl file system test suit
3 Authors:
4         Fenghua Yu <fenghua.yu@intel.com>
5         Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,
7 resctrl_tests tests various resctrl functionalities and interfaces including
8 both software and hardware.
10 Currently it supports Memory Bandwidth Monitoring test and Memory Bandwidth
11 Allocation test on Intel RDT hardware. More tests will be added in the future.
12 And the test suit can be extended to cover AMD QoS and ARM MPAM hardware
13 as well.
15 resctrl_tests can be run with or without kselftest framework.
17 WITH KSELFTEST FRAMEWORK
18 =======================
20 BUILD
21 -----
23 Build executable file "resctrl_tests" from top level directory of the kernel source:
24  $ make -C tools/testing/selftests TARGETS=resctrl
26 RUN
27 ---
29 Run resctrl_tests as sudo or root since the test needs to mount resctrl file
30 system and change contents in the file system.
31 Using kselftest framework will run all supported tests within resctrl_tests:
33  $ sudo make -C tools/testing/selftests TARGETS=resctrl run_tests
35 More details about kselftest framework can be found in
36 Documentation/dev-tools/kselftest.rst.
38 WITHOUT KSELFTEST FRAMEWORK
39 ===========================
41 BUILD
42 -----
44 Build executable file "resctrl_tests" from this directory(tools/testing/selftests/resctrl/):
45   $ make
47 RUN
48 ---
50 Run resctrl_tests as sudo or root since the test needs to mount resctrl file
51 system and change contents in the file system.
52 Executing the test without any parameter will run all supported tests:
54  $ sudo ./resctrl_tests
56 OVERVIEW OF EXECUTION
57 =====================
59 A test case has four stages:
61   - setup: mount resctrl file system, create group, setup schemata, move test
62     process pids to tasks, start benchmark.
63   - execute: let benchmark run
64   - verify: get resctrl data and verify the data with another source, e.g.
65     perf event.
66   - teardown: umount resctrl and clear temporary files.
68 ARGUMENTS
69 =========
71 Parameter '-h' shows usage information.
73 usage: resctrl_tests [-h] [-b "benchmark_cmd [options]"] [-t test list] [-n no_of_bits]
74         -b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CMT default benchmark is builtin fill_buf
75         -t test list: run tests specified in the test list, e.g. -t mbm,mba,cmt,cat
76         -n no_of_bits: run cache tests using specified no of bits in cache bit mask
77         -p cpu_no: specify CPU number to run the test. 1 is default
78         -h: help