]> git.itanic.dy.fi Git - linux-stable/commit
selftests/resctrl: Fix feature checks
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 2 Oct 2023 09:48:12 +0000 (12:48 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 13 Oct 2023 20:54:34 +0000 (14:54 -0600)
commit06035f019422ba17e85c11e70d6d8bdbe9fa1afd
treef554024a03cd4fd205d944eca75ee5f377277272
parentd56e5da0e0f557a206bace16bbbdad00a5800e34
selftests/resctrl: Fix feature checks

The MBA and CMT tests expect support of other features to be able to
run.

When platform only supports MBA but not MBM, MBA test will fail with:
Failed to open total bw file: No such file or directory

When platform only supports CMT but not CAT, CMT test will fail with:
Failed to open bit mask file '/sys/fs/resctrl/info/L3/cbm_mask': No such file or directory

It leads to the test reporting test fail (even if no test was run at
all).

Extend feature checks to cover these two conditions to show these tests
were skipped rather than failed.

Fixes: ee0415681eb6 ("selftests/resctrl: Use resctrl/info for feature detection")
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Cc: <stable@vger.kernel.org> # selftests/resctrl: Refactor feature check to use resource and feature name
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/resctrl_tests.c