public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] selftests/resctrl: Simplify test cleanup functions
@ 2024-02-20 13:14 Maciej Wieczor-Retman
  2024-02-20 13:14 ` [PATCH 1/3] selftests/resctrl: Add cleanup function to test framework Maciej Wieczor-Retman
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Maciej Wieczor-Retman @ 2024-02-20 13:14 UTC (permalink / raw)
  To: shuah, reinette.chatre, fenghua.yu
  Cc: linux-kselftest, linux-kernel, ilpo.jarvinen

Cleaning up after tests is implemented separately for individual tests
and called at the end of each test execution. Since these functions are
very similar and a more generalized test framework was introduced a
function pointer in the resctrl_test struct can be used to reduce the
amount of function calls.

These functions are also all called in the ctrl-c handler because the
handler isn't aware which test is currently running. Since the handler
is implemented with a sigaction no function parameters can be passed
there but information about what test is currently running can be passed
with a global variable.

Maciej Wieczor-Retman (3):
  selftests/resctrl: Add cleanup function to test framework
  selftests/resctrl: Simplify cleanup in ctrl-c handler
  selftests/resctrl: Move cleanups out of individual tests

 tools/testing/selftests/resctrl/cat_test.c    |  5 ++---
 tools/testing/selftests/resctrl/cmt_test.c    |  4 ++--
 tools/testing/selftests/resctrl/mba_test.c    |  5 ++---
 tools/testing/selftests/resctrl/mbm_test.c    |  5 ++---
 tools/testing/selftests/resctrl/resctrl.h     |  8 +++----
 .../testing/selftests/resctrl/resctrl_tests.c | 22 ++++++++++---------
 tools/testing/selftests/resctrl/resctrl_val.c |  2 +-
 7 files changed, 25 insertions(+), 26 deletions(-)

-- 
2.43.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-02-20 14:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 13:14 [PATCH 0/3] selftests/resctrl: Simplify test cleanup functions Maciej Wieczor-Retman
2024-02-20 13:14 ` [PATCH 1/3] selftests/resctrl: Add cleanup function to test framework Maciej Wieczor-Retman
2024-02-20 13:14 ` [PATCH 2/3] selftests/resctrl: Simplify cleanup in ctrl-c handler Maciej Wieczor-Retman
2024-02-20 13:45   ` Ilpo Järvinen
2024-02-20 14:08     ` Maciej Wieczor-Retman
2024-02-20 14:21       ` Ilpo Järvinen
2024-02-20 13:14 ` [PATCH 3/3] selftests/resctrl: Move cleanups out of individual tests Maciej Wieczor-Retman
2024-02-20 13:49   ` Ilpo Järvinen
2024-02-20 14:08     ` Maciej Wieczor-Retman
2024-02-20 13:18 ` [PATCH 0/3] selftests/resctrl: Simplify test cleanup functions Maciej Wieczor-Retman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox