Skip to content

RFC kselftest/resctrl: CAT functional tests

Ilpo Järvinen linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kselftest/resctrl: L3 CAT resctrl FS functional teststools/testing/selftests/resctrl/cat_test.c tools/testing/selftests/resctrl/resctrl.h tools/testing/selftests/resctrl/resctrl_tests.c +1 more+135 -00 replies
2/2kselftest/resctrl: Add L3 CAT CBM functional test for Intel RDTtools/testing/selftests/resctrl/cat_test.c tools/testing/selftests/resctrl/msr.c tools/testing/selftests/resctrl/resctrl.h +1 more+186 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH v1 0/2] kselftest/resctrl: CAT functional tests

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

Signature · 1 line
2.39.5