18c2ecf20Sopenharmony_ciresctrl_tests - resctrl file system test suit
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciAuthors:
48c2ecf20Sopenharmony_ci	Fenghua Yu <fenghua.yu@intel.com>
58c2ecf20Sopenharmony_ci	Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciresctrl_tests tests various resctrl functionalities and interfaces including
88c2ecf20Sopenharmony_ciboth software and hardware.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciCurrently it supports Memory Bandwidth Monitoring test and Memory Bandwidth
118c2ecf20Sopenharmony_ciAllocation test on Intel RDT hardware. More tests will be added in the future.
128c2ecf20Sopenharmony_ciAnd the test suit can be extended to cover AMD QoS and ARM MPAM hardware
138c2ecf20Sopenharmony_cias well.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciBUILD
168c2ecf20Sopenharmony_ci-----
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciRun "make" to build executable file "resctrl_tests".
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciRUN
218c2ecf20Sopenharmony_ci---
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciTo use resctrl_tests, root or sudoer privileges are required. This is because
248c2ecf20Sopenharmony_cithe test needs to mount resctrl file system and change contents in the file
258c2ecf20Sopenharmony_cisystem.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciExecuting the test without any parameter will run all supported tests:
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci	sudo ./resctrl_tests
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciOVERVIEW OF EXECUTION
328c2ecf20Sopenharmony_ci---------------------
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciA test case has four stages:
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci  - setup: mount resctrl file system, create group, setup schemata, move test
378c2ecf20Sopenharmony_ci    process pids to tasks, start benchmark.
388c2ecf20Sopenharmony_ci  - execute: let benchmark run
398c2ecf20Sopenharmony_ci  - verify: get resctrl data and verify the data with another source, e.g.
408c2ecf20Sopenharmony_ci    perf event.
418c2ecf20Sopenharmony_ci  - teardown: umount resctrl and clear temporary files.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciARGUMENTS
448c2ecf20Sopenharmony_ci---------
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ciParameter '-h' shows usage information.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciusage: resctrl_tests [-h] [-b "benchmark_cmd [options]"] [-t test list] [-n no_of_bits]
498c2ecf20Sopenharmony_ci        -b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CQM default benchmark is builtin fill_buf
508c2ecf20Sopenharmony_ci        -t test list: run tests specified in the test list, e.g. -t mbm,mba,cqm,cat
518c2ecf20Sopenharmony_ci        -n no_of_bits: run cache tests using specified no of bits in cache bit mask
528c2ecf20Sopenharmony_ci        -p cpu_no: specify CPU number to run the test. 1 is default
538c2ecf20Sopenharmony_ci        -h: help
54