0001 resctrl_tests - resctrl file system test suit
0002
0003 Authors:
0004 Fenghua Yu <fenghua.yu@intel.com>
0005 Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,
0006
0007 resctrl_tests tests various resctrl functionalities and interfaces including
0008 both software and hardware.
0009
0010 Currently it supports Memory Bandwidth Monitoring test and Memory Bandwidth
0011 Allocation test on Intel RDT hardware. More tests will be added in the future.
0012 And the test suit can be extended to cover AMD QoS and ARM MPAM hardware
0013 as well.
0014
0015 resctrl_tests can be run with or without kselftest framework.
0016
0017 WITH KSELFTEST FRAMEWORK
0018 =======================
0019
0020 BUILD
0021 -----
0022
0023 Build executable file "resctrl_tests" from top level directory of the kernel source:
0024 $ make -C tools/testing/selftests TARGETS=resctrl
0025
0026 RUN
0027 ---
0028
0029 Run resctrl_tests as sudo or root since the test needs to mount resctrl file
0030 system and change contents in the file system.
0031 Using kselftest framework will run all supported tests within resctrl_tests:
0032
0033 $ sudo make -C tools/testing/selftests TARGETS=resctrl run_tests
0034
0035 More details about kselftest framework can be found in
0036 Documentation/dev-tools/kselftest.rst.
0037
0038 WITHOUT KSELFTEST FRAMEWORK
0039 ===========================
0040
0041 BUILD
0042 -----
0043
0044 Build executable file "resctrl_tests" from this directory(tools/testing/selftests/resctrl/):
0045 $ make
0046
0047 RUN
0048 ---
0049
0050 Run resctrl_tests as sudo or root since the test needs to mount resctrl file
0051 system and change contents in the file system.
0052 Executing the test without any parameter will run all supported tests:
0053
0054 $ sudo ./resctrl_tests
0055
0056 OVERVIEW OF EXECUTION
0057 =====================
0058
0059 A test case has four stages:
0060
0061 - setup: mount resctrl file system, create group, setup schemata, move test
0062 process pids to tasks, start benchmark.
0063 - execute: let benchmark run
0064 - verify: get resctrl data and verify the data with another source, e.g.
0065 perf event.
0066 - teardown: umount resctrl and clear temporary files.
0067
0068 ARGUMENTS
0069 =========
0070
0071 Parameter '-h' shows usage information.
0072
0073 usage: resctrl_tests [-h] [-b "benchmark_cmd [options]"] [-t test list] [-n no_of_bits]
0074 -b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CMT default benchmark is builtin fill_buf
0075 -t test list: run tests specified in the test list, e.g. -t mbm,mba,cmt,cat
0076 -n no_of_bits: run cache tests using specified no of bits in cache bit mask
0077 -p cpu_no: specify CPU number to run the test. 1 is default
0078 -h: help