79 lines · plain
1resctrl_tests - resctrl file system test suit2 3Authors:4 Fenghua Yu <fenghua.yu@intel.com>5 Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,6 7resctrl_tests tests various resctrl functionalities and interfaces including8both software and hardware.9 10Currently it supports Memory Bandwidth Monitoring test and Memory Bandwidth11Allocation test on Intel RDT hardware. More tests will be added in the future.12And the test suit can be extended to cover AMD QoS and ARM MPAM hardware13as well.14 15resctrl_tests can be run with or without kselftest framework.16 17WITH KSELFTEST FRAMEWORK18=======================19 20BUILD21-----22 23Build executable file "resctrl_tests" from top level directory of the kernel source:24 $ make -C tools/testing/selftests TARGETS=resctrl25 26RUN27---28 29Run resctrl_tests as sudo or root since the test needs to mount resctrl file30system and change contents in the file system.31Using kselftest framework will run all supported tests within resctrl_tests:32 33 $ sudo make -C tools/testing/selftests TARGETS=resctrl run_tests34 35More details about kselftest framework can be found in36Documentation/dev-tools/kselftest.rst.37 38WITHOUT KSELFTEST FRAMEWORK39===========================40 41BUILD42-----43 44Build executable file "resctrl_tests" from this directory(tools/testing/selftests/resctrl/):45 $ make46 47RUN48---49 50Run resctrl_tests as sudo or root since the test needs to mount resctrl file51system and change contents in the file system.52Executing the test without any parameter will run all supported tests:53 54 $ sudo ./resctrl_tests55 56OVERVIEW OF EXECUTION57=====================58 59A test case has four stages:60 61 - setup: mount resctrl file system, create group, setup schemata, move test62 process pids to tasks, start benchmark.63 - execute: let benchmark run64 - verify: get resctrl data and verify the data with another source, e.g.65 perf event.66 - teardown: umount resctrl and clear temporary files.67 68ARGUMENTS69=========70 71Parameter '-h' shows usage information.72 73usage: 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_buf75 -t test list: run tests specified in the test list, e.g. -t mbm,mba,cmt,cat76 -n no_of_bits: run cache tests using specified no of bits in cache bit mask77 -p cpu_no: specify CPU number to run the test. 1 is default78 -h: help79