Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/resctrl: Update README about using kselftest framework to build/run resctrl_tests

resctrl_tests can be built or run using kselftests framework.
Add description on how to do so in README.

Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Shaopeng Tan and committed by
Shuah Khan
42e2f214 b733143c

+32 -7
+32 -7
tools/testing/selftests/resctrl/README
··· 12 12 And the test suit can be extended to cover AMD QoS and ARM MPAM hardware 13 13 as well. 14 14 15 + resctrl_tests can be run with or without kselftest framework. 16 + 17 + WITH KSELFTEST FRAMEWORK 18 + ======================= 19 + 15 20 BUILD 16 21 ----- 17 22 18 - Run "make" to build executable file "resctrl_tests". 23 + Build executable file "resctrl_tests" from top level directory of the kernel source: 24 + $ make -C tools/testing/selftests TARGETS=resctrl 19 25 20 26 RUN 21 27 --- 22 28 23 - To use resctrl_tests, root or sudoer privileges are required. This is because 24 - the test needs to mount resctrl file system and change contents in the file 25 - system. 29 + Run resctrl_tests as sudo or root since the test needs to mount resctrl file 30 + system and change contents in the file system. 31 + Using kselftest framework will run all supported tests within resctrl_tests: 26 32 33 + $ sudo make -C tools/testing/selftests TARGETS=resctrl run_tests 34 + 35 + More details about kselftest framework can be found in 36 + Documentation/dev-tools/kselftest.rst. 37 + 38 + WITHOUT KSELFTEST FRAMEWORK 39 + =========================== 40 + 41 + BUILD 42 + ----- 43 + 44 + Build executable file "resctrl_tests" from this directory(tools/testing/selftests/resctrl/): 45 + $ make 46 + 47 + RUN 48 + --- 49 + 50 + Run resctrl_tests as sudo or root since the test needs to mount resctrl file 51 + system and change contents in the file system. 27 52 Executing the test without any parameter will run all supported tests: 28 53 29 - sudo ./resctrl_tests 54 + $ sudo ./resctrl_tests 30 55 31 56 OVERVIEW OF EXECUTION 32 - --------------------- 57 + ===================== 33 58 34 59 A test case has four stages: 35 60 ··· 66 41 - teardown: umount resctrl and clear temporary files. 67 42 68 43 ARGUMENTS 69 - --------- 44 + ========= 70 45 71 46 Parameter '-h' shows usage information. 72 47