Skip to content
Commit a3611fbc authored by Fenghua Yu's avatar Fenghua Yu Committed by Shuah Khan
Browse files

selftests/resctrl: Check for resctrl mount point only if resctrl FS is supported



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: default avatarBabu Moger <babu.moger@amd.com>
Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent b67a7665
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment