selftests: tracing: Fix to unmount tracefs for recovering environment
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 12 Sep 2023 01:10:39 +0000 (10:10 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 12 Sep 2023 15:34:20 +0000 (09:34 -0600)
commit7e021da80f48582171029714f8a487347f29dddb
tree9dace07b4492013ef2492f3471b952d9d7f43ef1
parent7ab6fe6625c9bdcb8fa5f61c8f8e30e13f689284
selftests: tracing: Fix to unmount tracefs for recovering environment

Fix to unmount the tracefs if the ftracetest mounted it for recovering
system environment. If the tracefs is 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: cbd965bde74c ("ftrace/selftests: Return the skip code when tracing directory not configured in kernel")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/ftrace/ftracetest