lkml.org 
[lkml]   [2021]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 12/21] selftests/resctrl: Check for resctrl mount point only if resctrl FS is supported
From
Date
On 3/16/21 8:22 PM, Fenghua Yu wrote:
> check_resctrlfs_support() does the following
> 1. Checks if the platform supports resctrl file system or not by looking
> for resctrl in /proc/filesystems
> 2. Calls opendir() on default resctrl file system path
> (i.e. /sys/fs/resctrl)
> 3. Checks if resctrl file system is mounted or not by looking at
> /proc/mounts
>
> Steps 2 and 3 will fail if the platform does not support resctrl file
> system. So, there is no need to check for them if step 1 fails.
>
> Fix this by returning immediately if the platform does not support
> resctrl file system.
>
> Tested-by: Babu Moger <babu.moger@amd.com>
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> ---
> tools/testing/selftests/resctrl/resctrlfs.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
> index 6b22a186790a..87195eb78356 100644
> --- a/tools/testing/selftests/resctrl/resctrlfs.c
> +++ b/tools/testing/selftests/resctrl/resctrlfs.c
> @@ -570,6 +570,9 @@ bool check_resctrlfs_support(void)
> ksft_print_msg("%s kernel supports resctrl filesystem\n",
> ret ? "Pass:" : "Fail:");
>

This message is a bit confusing. Please change this to read
and send a follow-on patch on top of linux-kselftest next

"Check kernel support for resctrl filesystem"

thanks,
-- Shuah

\
 
 \ /
  Last update: 2021-04-02 21:50    [W:0.600 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site