selftests/user_events: Fix to unmount tracefs when test created mount
authorBeau Belgrave <beaub@linux.microsoft.com>
Fri, 15 Sep 2023 22:27:54 +0000 (22:27 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 18 Sep 2023 17:04:52 +0000 (11:04 -0600)
commit8ed99af4a266a3492d773b5d85c3f8e9f81254b6
tree3cb2552e304b8529468c45140baa76d995312f24
parentce9ecca0238b140b88f43859b211c9fdfd8e5b70
selftests/user_events: Fix to unmount tracefs when test created mount

Fix to unmount tracefs if the self-test mounted it to allow testing.
If tracefs was already mounted, this does nothing.

Suggested-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/all/29fce076-746c-4650-8358-b4e0fa215cf7@sirena.org.uk/
Fixes: a06023a8f78d ("selftests/user_events: Fix failures when user_events is not installed")
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/user_events/abi_test.c
tools/testing/selftests/user_events/dyn_test.c
tools/testing/selftests/user_events/ftrace_test.c
tools/testing/selftests/user_events/perf_test.c
tools/testing/selftests/user_events/user_events_selftests.h