Message ID | 20210317022255.2536745-19-fenghua.yu@intel.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | Miscellaneous fixes for resctrl selftests | expand |
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c index fb246bc41f47..f51b5fc066a3 100644 --- a/tools/testing/selftests/resctrl/resctrl_tests.c +++ b/tools/testing/selftests/resctrl/resctrl_tests.c @@ -253,5 +253,7 @@ int main(int argc, char **argv) if (cat_test) run_cat_test(cpu_no, no_of_bits); + umount_resctrlfs(); + return ksft_exit_pass(); } diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c index 26563175acf6..ade5f2b8b843 100644 --- a/tools/testing/selftests/resctrl/resctrlfs.c +++ b/tools/testing/selftests/resctrl/resctrlfs.c @@ -82,6 +82,9 @@ int remount_resctrlfs(bool mum_resctrlfs) int umount_resctrlfs(void) { + if (find_resctrl_mount(NULL)) + return 0; + if (umount(RESCTRL_PATH)) { perror("# Unable to umount resctrl");