]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/resctrl: Modularize resctrl test suite main() function
authorFenghua Yu <fenghua.yu@intel.com>
Wed, 17 Mar 2021 02:22:50 +0000 (02:22 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 2 Apr 2021 19:58:14 +0000 (13:58 -0600)
commitdcd03fa905eaf5bd52f9b887dcaef53821d96347
tree6628b093261c61426daf8a9f1b46f4ecb5708925
parentdb7ada653ea1bdf2a6a76fb9667190392deca6a9
selftests/resctrl: Modularize resctrl test suite main() function

Resctrl test suite main() function does the following things
1. Parses command line arguments passed by user
2. Some setup checks
3. Logic that calls into each unit test
4. Print result and clean up after running each unit test

Introduce wrapper functions for steps 3 and 4 to modularize the main()
function. Adding these wrapper functions makes it easier to add any logic
to each individual test.

Please note that this is a preparatory patch for the next one and no
functional changes are intended.

Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/resctrl_tests.c