diff options
| author | Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> | 2024-02-27 08:21:43 +0100 |
|---|---|---|
| committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-05-06 13:57:19 -0600 |
| commit | 6cd368982cf3f972e5298025af0a9d2b69045cfe (patch) | |
| tree | f26af66119fcec652f1fa9a86f2afc2c8ef92a9f /tools/testing/selftests/resctrl/cmt_test.c | |
| parent | e6487230e952cfd4070c61141f011608841f36eb (diff) | |
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>
Diffstat (limited to 'tools/testing/selftests/resctrl/cmt_test.c')
| -rw-r--r-- | tools/testing/selftests/resctrl/cmt_test.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c index a01ccf86e6ce..a44e6fcd37b7 100644 --- a/tools/testing/selftests/resctrl/cmt_test.c +++ b/tools/testing/selftests/resctrl/cmt_test.c @@ -91,7 +91,7 @@ static int check_results(struct resctrl_val_param *param, size_t span, int no_of MAX_DIFF, MAX_DIFF_PERCENT, runs - 1, true); } -void cmt_test_cleanup(void) +static void cmt_test_cleanup(void) { remove(RESULT_FILE_NAME); } @@ -161,7 +161,6 @@ static int cmt_run_test(const struct resctrl_test *test, const struct user_param ksft_print_msg("Intel CMT may be inaccurate when Sub-NUMA Clustering is enabled. Check BIOS configuration.\n"); out: - cmt_test_cleanup(); free(span_str); return ret; |