selftests/resctrl: Remove "once" parameter required to be false
authorReinette Chatre <reinette.chatre@intel.com>
Thu, 24 Oct 2024 21:18:44 +0000 (14:18 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 5 Nov 2024 00:02:03 +0000 (17:02 -0700)
commitf3069136c95f15c05d166281cbb55f0509a42ae1
tree52c015aec8231ab7bed3361ab5c51723bc653220
parentefffa8c40166af680959c030a815afa8d06af66a
selftests/resctrl: Remove "once" parameter required to be false

The CMT, MBM, and MBA tests rely on a benchmark that runs while
the test makes changes to needed configuration (for example memory
bandwidth allocation) and takes needed measurements. By default
the "fill_buf" benchmark is used and by default (via its
"once = false" setting) "fill_buf" is configured to run until
terminated after the test completes.

An unintended consequence of enabling the user to override the
benchmark also enables the user to change parameters to the
"fill_buf" benchmark. This enables the user to set "fill_buf" to
only cycle through the buffer once (by setting "once = true")
and thus breaking the CMT, MBA, and MBM tests that expect
workload/interference to be reflected by their measurements.

Prevent user space from changing the "once" parameter and ensure
that it is always false for the CMT, MBA, and MBM tests.

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/fill_buf.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_tests.c
tools/testing/selftests/resctrl/resctrl_val.c