diff options
author | Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> | 2024-02-16 09:35:28 +0100 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-02-23 23:19:15 +0100 |
commit | 00616416488868a8b98343863e5ac078506e44e8 (patch) | |
tree | 2990c521d9c043631ad618ffe3eddc897e9f182c /tools/testing/selftests/resctrl/cmt_test.c | |
parent | selftests/resctrl: Add a helper for the non-contiguous test (diff) | |
download | linux-00616416488868a8b98343863e5ac078506e44e8.tar.xz linux-00616416488868a8b98343863e5ac078506e44e8.zip |
selftests/resctrl: Split validate_resctrl_feature_request()
validate_resctrl_feature_request() is used to test both if a resource is
present in the info directory, and if a passed monitoring feature is
present in the mon_features file.
Refactor validate_resctrl_feature_request() into two smaller functions
that each accomplish one check to give feature checking more
granularity:
- Resource directory presence in the /sys/fs/resctrl/info directory.
- Feature name presence in the /sys/fs/resctrl/info/<RESOURCE>/mon_features
file.
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/cmt_test.c')
-rw-r--r-- | tools/testing/selftests/resctrl/cmt_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c index dd5ca343c469..a81f91222a89 100644 --- a/tools/testing/selftests/resctrl/cmt_test.c +++ b/tools/testing/selftests/resctrl/cmt_test.c @@ -170,7 +170,7 @@ out: static bool cmt_feature_check(const struct resctrl_test *test) { return test_resource_feature_check(test) && - validate_resctrl_feature_request("L3_MON", "llc_occupancy"); + resctrl_mon_feature_exists("L3_MON", "llc_occupancy"); } struct resctrl_test cmt_test = { |