Hi Reinette
On 11/10/2021 1:33 AM, Shaopeng Tan wrote:
From: "Tan, Shaopeng" tan.shaopeng@jp.fujitsu.com
This commit enables kselftest to be built/run in resctrl framework. Build/run resctrl_tests by build/run all tests of kselftest, or by using the "TARGETS" variable on the make command line to specify
resctrl_tests.
To make resctrl_tests run using kselftest framework, this commit modified the Makefile of kernel kselftest set and the Makefile of
resctrl_tests.
The above sentence mentions that changes were made to the resctrl selftest Makefile but it does not describe what the change accomplish or why they are needed. Could you please elaborate?
Before these changes of Makefile, when we run resctrl test, we need to goto tools/testing/selftests/resctrl/ directory, run "make" to build executable file "resctrl_tests", and run "sudo ./resctrl_tests" to execute the test.
With this patch, we can resctrl test in selftest framwork as follow. Run all tests include resctrl: $ make -C tools/testing/selftests run_tests Run a subset(resctrl) of selftests: $ make -C tools/testing/selftests TARGETS=resctrl run_tests
Linux Kernel Selftests : https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
To ensure the resctrl_tests finish in limited time, this commit changed the default limited time(45s) to 120 seconds for resctrl_tests by adding "setting" file.
How is changing the timeout related to the resctrl framework changes? Is it not a separate change?
In selftest framwork, the default limited time of all tests is 45 seconds which is specified by common file tools/testing/selftests/kselftest/runner.sh. Each test can change the limited time individually by adding a "setting" file into its own directory. I changed the limited time of resctrl to120s because 45s was not enough in my environment.
Regards, Shaopeng Tan