Message ID | 523fc548414652dfe2068f60b959905e5a4a0e1d.1589835155.git.sai.praneeth.prakhya@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Miscellaneous fixes for resctrl selftests | expand |
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c index 727e667e2cc9..e43ddebd1aa4 100644 --- a/tools/testing/selftests/resctrl/resctrlfs.c +++ b/tools/testing/selftests/resctrl/resctrlfs.c @@ -581,6 +581,9 @@ bool check_resctrlfs_support(void) printf("%sok kernel supports resctrl filesystem\n", ret ? "" : "not "); tests_run++; + if (!ret) + return ret; + dp = opendir(RESCTRL_PATH); printf("%sok resctrl mountpoint \"%s\" exists\n", dp ? "" : "not ", RESCTRL_PATH);
Presently, check_resctrlfs_support() tries to open "/sys/fs/resctrl" and will also look for resctrl mount point in "/proc/mounts" even if resctrl file system is not supported. Both the above will fail if resctrl file system is not supported. Hence, return immediately if resctrl file system is not supported. Fixes: ecdbb911f22d ("selftests/resctrl: Add MBM test") Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com> --- tools/testing/selftests/resctrl/resctrlfs.c | 3 +++ 1 file changed, 3 insertions(+)