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