[00/22] selftests/resctrl: Fixes, cleanups, and rewritten CAT test

Message ID 20230412132122.29452-1-ilpo.jarvinen@linux.intel.com
Headers
Series selftests/resctrl: Fixes, cleanups, and rewritten CAT test |

Message

Ilpo Järvinen April 12, 2023, 1:21 p.m. UTC
  Here is a series with some fixes and cleanups to resctrl selftests and
rewrite of CAT test into something that really tests CAT working or not
condition.

I know that this series will conflict with some of patches from
Shaopeng Tan that so far have not made it into the kselftest tree. Due
to CAT test rewrite done in this series, some of those patches would no
longer be relevant anyway but some of them are still very valid (I've
not tried to reinvent the fixes in Shaopeng's series in this series).

Ilpo Järvinen (22):
  selftests/resctrl: Add resctrl.h into build deps
  selftests/resctrl: Check also too low values for CBM bits
  selftests/resctrl: Make span unsigned long everywhere
  selftests/resctrl: Express span in bytes
  selftests/resctrl: Remove duplicated preparation for span arg
  selftests/resctrl: Don't use variable argument list for ->setup()
  selftests/resctrl: Remove "malloc_and_init_memory" param from
    run_fill_buf()
  selftests/resctrl: Split run_fill_buf() to alloc, work, and dealloc
    helpers
  selftests/resctrl: Remove start_buf local variable from buffer alloc
    func
  selftests/resctrl: Don't pass test name to fill_buf
  selftests/resctrl: Add flush_buffer() to fill_buf
  selftests/resctrl: Remove test type checks from cat_val()
  selftests/resctrl: Refactor get_cbm_mask()
  selftests/resctrl: Create cache_alloc_size() helper
  selftests/resctrl: Replace count_bits with count_consecutive_bits()
  selftests/resctrl: Exclude shareable bits from schemata in CAT test
  selftests/resctrl: Pass the real number of tests to show_cache_info()
  selftests/resctrl: Move CAT/CMT test global vars to func they are used
  selftests/resctrl: Read in less obvious order to defeat prefetch
    optimizations
  selftests/resctrl: Split measure_cache_vals() function
  selftests/resctrl: Split show_cache_info() to test specific and
    generic parts
  selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test

 tools/testing/selftests/resctrl/Makefile      |   2 +-
 tools/testing/selftests/resctrl/cache.c       | 154 ++++++------
 tools/testing/selftests/resctrl/cat_test.c    | 221 +++++++++---------
 tools/testing/selftests/resctrl/cmt_test.c    |  60 +++--
 tools/testing/selftests/resctrl/fill_buf.c    | 107 +++++----
 tools/testing/selftests/resctrl/mba_test.c    |   8 +-
 tools/testing/selftests/resctrl/mbm_test.c    |  16 +-
 tools/testing/selftests/resctrl/resctrl.h     |  28 ++-
 .../testing/selftests/resctrl/resctrl_tests.c |  34 ++-
 tools/testing/selftests/resctrl/resctrl_val.c |   4 +-
 tools/testing/selftests/resctrl/resctrlfs.c   | 160 ++++++++++---
 11 files changed, 447 insertions(+), 347 deletions(-)