selftests/resctrl: Move cleanups out of individual tests
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Tue, 27 Feb 2024 07:21:43 +0000 (08:21 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 6 May 2024 19:57:19 +0000 (13:57 -0600)
commit6cd368982cf3f972e5298025af0a9d2b69045cfe
treef26af66119fcec652f1fa9a86f2afc2c8ef92a9f
parente6487230e952cfd4070c61141f011608841f36eb
selftests/resctrl: Move cleanups out of individual tests

Every test calls its cleanup function at the end of it's test function.
After the cleanup function pointer is added to the test framework this
can be simplified to executing the callback function at the end of the
generic test running function.

Make test cleanup functions static and call them from the end of
run_single_test() from the resctrl_test's cleanup function pointer.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cat_test.c
tools/testing/selftests/resctrl/cmt_test.c
tools/testing/selftests/resctrl/mba_test.c
tools/testing/selftests/resctrl/mbm_test.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_tests.c