xref: /linux/tools/testing/selftests/resctrl/README (revision 034c7678dd2c05fb08e6fa3b0ac527ead8f1b11b)
1*034c7678SFenghua Yuresctrl_tests - resctrl file system test suit
2*034c7678SFenghua Yu
3*034c7678SFenghua YuAuthors:
4*034c7678SFenghua Yu	Fenghua Yu <fenghua.yu@intel.com>
5*034c7678SFenghua Yu	Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,
6*034c7678SFenghua Yu
7*034c7678SFenghua Yuresctrl_tests tests various resctrl functionalities and interfaces including
8*034c7678SFenghua Yuboth software and hardware.
9*034c7678SFenghua Yu
10*034c7678SFenghua YuCurrently it supports Memory Bandwidth Monitoring test and Memory Bandwidth
11*034c7678SFenghua YuAllocation test on Intel RDT hardware. More tests will be added in the future.
12*034c7678SFenghua YuAnd the test suit can be extended to cover AMD QoS and ARM MPAM hardware
13*034c7678SFenghua Yuas well.
14*034c7678SFenghua Yu
15*034c7678SFenghua YuBUILD
16*034c7678SFenghua Yu-----
17*034c7678SFenghua Yu
18*034c7678SFenghua YuRun "make" to build executable file "resctrl_tests".
19*034c7678SFenghua Yu
20*034c7678SFenghua YuRUN
21*034c7678SFenghua Yu---
22*034c7678SFenghua Yu
23*034c7678SFenghua YuTo use resctrl_tests, root or sudoer privileges are required. This is because
24*034c7678SFenghua Yuthe test needs to mount resctrl file system and change contents in the file
25*034c7678SFenghua Yusystem.
26*034c7678SFenghua Yu
27*034c7678SFenghua YuExecuting the test without any parameter will run all supported tests:
28*034c7678SFenghua Yu
29*034c7678SFenghua Yu	sudo ./resctrl_tests
30*034c7678SFenghua Yu
31*034c7678SFenghua YuOVERVIEW OF EXECUTION
32*034c7678SFenghua Yu---------------------
33*034c7678SFenghua Yu
34*034c7678SFenghua YuA test case has four stages:
35*034c7678SFenghua Yu
36*034c7678SFenghua Yu  - setup: mount resctrl file system, create group, setup schemata, move test
37*034c7678SFenghua Yu    process pids to tasks, start benchmark.
38*034c7678SFenghua Yu  - execute: let benchmark run
39*034c7678SFenghua Yu  - verify: get resctrl data and verify the data with another source, e.g.
40*034c7678SFenghua Yu    perf event.
41*034c7678SFenghua Yu  - teardown: umount resctrl and clear temporary files.
42*034c7678SFenghua Yu
43*034c7678SFenghua YuARGUMENTS
44*034c7678SFenghua Yu---------
45*034c7678SFenghua Yu
46*034c7678SFenghua YuParameter '-h' shows usage information.
47*034c7678SFenghua Yu
48*034c7678SFenghua Yuusage: resctrl_tests [-h] [-b "benchmark_cmd [options]"] [-t test list] [-n no_of_bits]
49*034c7678SFenghua Yu        -b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CQM default benchmark is builtin fill_buf
50*034c7678SFenghua Yu        -t test list: run tests specified in the test list, e.g. -t mbm, mba, cqm, cat
51*034c7678SFenghua Yu        -n no_of_bits: run cache tests using specified no of bits in cache bit mask
52*034c7678SFenghua Yu        -p cpu_no: specify CPU number to run the test. 1 is default
53*034c7678SFenghua Yu        -h: help
54