[PATCH V2 17/19] selftests/resctrl: Unmount resctrl FS after running all tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



validate_resctrl_feature_request() would mount resctrl FS (if not already
mounted) to check if a requested feature is supported by the platform or
not. There could be situations where in all the resctrl tests are skipped
and hence main() function would return leaving the resctrl FS mounted.

To avoid resctrl FS being mounted, unmount resctrl FS before returning.
This shouldn't have any impact on the cases where all the tests might get
to run (or some of the test cases might get to run and the individual tests
unmount resctrl FS) because umount_resctrlfs() attempts to unmount
resctrl FS only if it's mounted.

Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@xxxxxxxxx>
---
 tools/testing/selftests/resctrl/resctrl_tests.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index d45ae004ed77..a0c14555d259 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -226,6 +226,7 @@ int main(int argc, char **argv)
 	}
 
 out:
+	umount_resctrlfs();
 	printf("1..%d\n", tests_run);
 
 	return 0;
-- 
2.19.1




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux