]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/resctrl: Add ->measure() callback to resctrl_val_param
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 10 Jun 2024 15:14:50 +0000 (18:14 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 11 Jul 2024 17:23:54 +0000 (11:23 -0600)
commit0e251816995a1972062fc7ad32047c1aee9cd704
tree63cb4337a08e0668585dbb4250b4f4c5fc7b9578
parent711d27b05a97cd5c8e62c858c2c940d79f8445e1
selftests/resctrl: Add ->measure() callback to resctrl_val_param

The measurement done in resctrl_val() varies depending on test type.
The decision for how to measure is decided based on the string compare
to test name which is quite inflexible.

Add ->measure() callback into the struct resctrl_val_param to allow
each test to provide necessary code as a function which simplifies what
resctrl_val() has to do.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cmt_test.c
tools/testing/selftests/resctrl/mba_test.c
tools/testing/selftests/resctrl/mbm_test.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_val.c