README 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. resctrl_tests - resctrl file system test suit
  2. Authors:
  3. Fenghua Yu <fenghua.yu@intel.com>
  4. Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>,
  5. resctrl_tests tests various resctrl functionalities and interfaces including
  6. both software and hardware.
  7. Currently it supports Memory Bandwidth Monitoring test and Memory Bandwidth
  8. Allocation test on Intel RDT hardware. More tests will be added in the future.
  9. And the test suit can be extended to cover AMD QoS and ARM MPAM hardware
  10. as well.
  11. resctrl_tests can be run with or without kselftest framework.
  12. WITH KSELFTEST FRAMEWORK
  13. =======================
  14. BUILD
  15. -----
  16. Build executable file "resctrl_tests" from top level directory of the kernel source:
  17. $ make -C tools/testing/selftests TARGETS=resctrl
  18. RUN
  19. ---
  20. Run resctrl_tests as sudo or root since the test needs to mount resctrl file
  21. system and change contents in the file system.
  22. Using kselftest framework will run all supported tests within resctrl_tests:
  23. $ sudo make -C tools/testing/selftests TARGETS=resctrl run_tests
  24. More details about kselftest framework can be found in
  25. Documentation/dev-tools/kselftest.rst.
  26. WITHOUT KSELFTEST FRAMEWORK
  27. ===========================
  28. BUILD
  29. -----
  30. Build executable file "resctrl_tests" from this directory(tools/testing/selftests/resctrl/):
  31. $ make
  32. RUN
  33. ---
  34. Run resctrl_tests as sudo or root since the test needs to mount resctrl file
  35. system and change contents in the file system.
  36. Executing the test without any parameter will run all supported tests:
  37. $ sudo ./resctrl_tests
  38. OVERVIEW OF EXECUTION
  39. =====================
  40. A test case has four stages:
  41. - setup: mount resctrl file system, create group, setup schemata, move test
  42. process pids to tasks, start benchmark.
  43. - execute: let benchmark run
  44. - verify: get resctrl data and verify the data with another source, e.g.
  45. perf event.
  46. - teardown: umount resctrl and clear temporary files.
  47. ARGUMENTS
  48. =========
  49. Parameter '-h' shows usage information.
  50. usage: resctrl_tests [-h] [-b "benchmark_cmd [options]"] [-t test list] [-n no_of_bits]
  51. -b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CMT default benchmark is builtin fill_buf
  52. -t test list: run tests specified in the test list, e.g. -t mbm,mba,cmt,cat
  53. -n no_of_bits: run cache tests using specified no of bits in cache bit mask
  54. -p cpu_no: specify CPU number to run the test. 1 is default
  55. -h: help