linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/2] kselftest/resctrl: CAT functional tests
@ 2025-06-16  8:24 Ilpo Järvinen
  2025-06-16  8:24 ` [RFC PATCH v1 1/2] kselftest/resctrl: L3 CAT resctrl FS " Ilpo Järvinen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ilpo Järvinen @ 2025-06-16  8:24 UTC (permalink / raw)
  To: linux-kselftest, Reinette Chatre, Shuah Khan, Tony Luck,
	Dave Martin, James Morse, Shaopeng Tan
  Cc: Fenghua Yu, linux-kernel, Ilpo Järvinen

Hi all,

In the last Fall Reinette mentioned functional tests of resctrl would
be preferred over selftests that are based on performance measurement.
This series tries to address that shortcoming by adding some functional
tests for resctrl FS interface and another that checks MSRs match to
what is written through resctrl FS. The MSR test is only available for
Intel CPUs at the moment.

Why RFC?

The new functional selftest itself works, AFAIK. However, calling
ksft_test_result_skip() in cat.c if MSR reading is found to be
unavailable is problematic because of how kselftest harness is
architected. The kselftest.h header itself defines some variables, so
including it into different .c files results in duplicating the test
framework related variables (duplication of ksft_count matters in this
case).

The duplication problem could be worked around by creating a resctrl
selftest specific wrapper for ksft_test_result_skip() into
resctrl_tests.c so the accounting would occur in the "correct" .c file,
but perhaps that is considered hacky and the selftest framework/build
systems should be reworked to avoid duplicating variables?


Ilpo Järvinen (2):
  kselftest/resctrl: CAT L3 resctrl FS function tests
  kselftest/resctrl: Add CAT L3 CBM functional test for Intel RDT

 tools/testing/selftests/resctrl/cat_test.c    | 210 ++++++++++++++++++
 tools/testing/selftests/resctrl/msr.c         |  55 +++++
 tools/testing/selftests/resctrl/resctrl.h     |   6 +
 .../testing/selftests/resctrl/resctrl_tests.c |   2 +
 tools/testing/selftests/resctrl/resctrlfs.c   |  48 ++++
 5 files changed, 321 insertions(+)
 create mode 100644 tools/testing/selftests/resctrl/msr.c


base-commit: c1d7e19c70cbb8a19f63c190cf53e71b5f970514
-- 
2.39.5


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

end of thread, other threads:[~2025-07-03 15:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16  8:24 [RFC PATCH v1 0/2] kselftest/resctrl: CAT functional tests Ilpo Järvinen
2025-06-16  8:24 ` [RFC PATCH v1 1/2] kselftest/resctrl: L3 CAT resctrl FS " Ilpo Järvinen
2025-06-16  8:24 ` [RFC PATCH v1 2/2] kselftest/resctrl: Add L3 CAT CBM functional test for Intel RDT Ilpo Järvinen
2025-06-27 18:04 ` [RFC PATCH v1 0/2] kselftest/resctrl: CAT functional tests Reinette Chatre
2025-07-03  9:27   ` Ilpo Järvinen
2025-07-03 15:42     ` Reinette Chatre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).