xref: /linux/tools/testing/selftests/resctrl/README (revision 2f320911d9fab38597d2a32d91b4f31165e0c9b4)
1034c7678SFenghua Yuresctrl_tests - resctrl file system test suit
2034c7678SFenghua Yu
3034c7678SFenghua YuAuthors:
4034c7678SFenghua Yu	Fenghua Yu <fenghua.yu@intel.com>
5034c7678SFenghua Yu	Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,
6034c7678SFenghua Yu
7034c7678SFenghua Yuresctrl_tests tests various resctrl functionalities and interfaces including
8034c7678SFenghua Yuboth software and hardware.
9034c7678SFenghua Yu
10034c7678SFenghua YuCurrently it supports Memory Bandwidth Monitoring test and Memory Bandwidth
11034c7678SFenghua YuAllocation test on Intel RDT hardware. More tests will be added in the future.
12034c7678SFenghua YuAnd the test suit can be extended to cover AMD QoS and ARM MPAM hardware
13034c7678SFenghua Yuas well.
14034c7678SFenghua Yu
15034c7678SFenghua YuBUILD
16034c7678SFenghua Yu-----
17034c7678SFenghua Yu
18034c7678SFenghua YuRun "make" to build executable file "resctrl_tests".
19034c7678SFenghua Yu
20034c7678SFenghua YuRUN
21034c7678SFenghua Yu---
22034c7678SFenghua Yu
23034c7678SFenghua YuTo use resctrl_tests, root or sudoer privileges are required. This is because
24034c7678SFenghua Yuthe test needs to mount resctrl file system and change contents in the file
25034c7678SFenghua Yusystem.
26034c7678SFenghua Yu
27034c7678SFenghua YuExecuting the test without any parameter will run all supported tests:
28034c7678SFenghua Yu
29034c7678SFenghua Yu	sudo ./resctrl_tests
30034c7678SFenghua Yu
31034c7678SFenghua YuOVERVIEW OF EXECUTION
32034c7678SFenghua Yu---------------------
33034c7678SFenghua Yu
34034c7678SFenghua YuA test case has four stages:
35034c7678SFenghua Yu
36034c7678SFenghua Yu  - setup: mount resctrl file system, create group, setup schemata, move test
37034c7678SFenghua Yu    process pids to tasks, start benchmark.
38034c7678SFenghua Yu  - execute: let benchmark run
39034c7678SFenghua Yu  - verify: get resctrl data and verify the data with another source, e.g.
40034c7678SFenghua Yu    perf event.
41034c7678SFenghua Yu  - teardown: umount resctrl and clear temporary files.
42034c7678SFenghua Yu
43034c7678SFenghua YuARGUMENTS
44034c7678SFenghua Yu---------
45034c7678SFenghua Yu
46034c7678SFenghua YuParameter '-h' shows usage information.
47034c7678SFenghua Yu
48034c7678SFenghua Yuusage: resctrl_tests [-h] [-b "benchmark_cmd [options]"] [-t test list] [-n no_of_bits]
49*2f320911SFenghua Yu        -b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CMT default benchmark is builtin fill_buf
50*2f320911SFenghua Yu        -t test list: run tests specified in the test list, e.g. -t mbm, mba, cmt, cat
51034c7678SFenghua Yu        -n no_of_bits: run cache tests using specified no of bits in cache bit mask
52034c7678SFenghua Yu        -p cpu_no: specify CPU number to run the test. 1 is default
53034c7678SFenghua Yu        -h: help
54