selftests/resctrl: Split validate_resctrl_feature_request()
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Fri, 16 Feb 2024 08:35:28 +0000 (09:35 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 23 Feb 2024 22:19:15 +0000 (15:19 -0700)
commit00616416488868a8b98343863e5ac078506e44e8
tree2990c521d9c043631ad618ffe3eddc897e9f182c
parente331ac141f1df6d151d24e60ff16e93ec075509e
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>
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/resctrlfs.c