selftests/resctrl: Refactor remount_resctrl(bool mum_resctrlfs) to mount_resctrl()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 17 Jul 2023 13:14:55 +0000 (16:14 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 25 Jul 2023 14:53:00 +0000 (08:53 -0600)
commit6383851a193b76dbd3ec09b91154e2dda6c96308
tree64e470ddc854d1b2b80969066567930d7a3cd318
parentcaddc0fbe4958a84b0dcd257439e9090c8fbfb8e
selftests/resctrl: Refactor remount_resctrl(bool mum_resctrlfs) to mount_resctrl()

Mount/umount of the resctrl FS is now paired nicely per test.

Rename remount_resctrl(bool mum_resctrlfs) to mount_resctrl(). Make
it unconditionally try to mount the resctrl FS and return error if
resctrl FS was mounted already.

While at it, group the mount/umount prototypes in the header.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Tested-by: Shaopeng Tan (Fujitsu) <tan.shaopeng@fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_tests.c
tools/testing/selftests/resctrl/resctrlfs.c