selftests/ftrace: Fix eventfs ownership testcase to find mount point
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 4 Sep 2024 15:30:21 +0000 (00:30 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 4 Sep 2024 21:08:18 +0000 (15:08 -0600)
commitf0a6ecebd858658df213d114b0530f8f0b96e396
treeffccd7fc8762626303ff330665349eb1ae77a9c9
parentb4bcdff7e839237d89a2aa15b6042b96b0240ac4
selftests/ftrace: Fix eventfs ownership testcase to find mount point

Fix eventfs ownership testcase to find mount point if stat -c "%m" failed.
This can happen on the system based on busybox. In this case, this will
try to use the current working directory, which should be a tracefs top
directory (and eventfs is mounted as a part of tracefs.)
If it does not work, the test is skipped as UNRESOLVED because of
the environmental problem.

Fixes: ee9793be08b1 ("tracing/selftests: Add ownership modification tests for eventfs")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc