summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ftrace
diff options
context:
space:
mode:
authorBeau Belgrave <beaub@linux.microsoft.com>2023-09-08 23:19:16 +0300
committerShuah Khan <skhan@linuxfoundation.org>2023-09-12 02:04:11 +0300
commita06023a8f78d3e9e73ca4363ccf3871a06e16ecc (patch)
treeb16187c093becfa15cf822c59ef62b858f15a7ba /tools/testing/selftests/ftrace
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff)
downloadlinux-a06023a8f78d3e9e73ca4363ccf3871a06e16ecc.tar.xz
selftests/user_events: Fix failures when user_events is not installed
When user_events is not installed the self tests currently fail. Now that these self tests run by default we need to ensure they don't fail when user_events was not enabled for the kernel being tested. Add common methods to detect if tracefs and user_events is enabled. If either is not enabled skip the test. If tracefs is enabled, but is not mounted, mount tracefs and fail if there were any errors. Fail if not run as root. Fixes: 68b4d2d58389 ("selftests/user_events: Reenable build") Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Link: https://lore.kernel.org/all/CA+G9fYuugZ0OMeS6HvpSS4nuf_A3s455ecipGBvER0LJHojKZg@mail.gmail.com/ Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/ftrace')
0 files changed, 0 insertions, 0 deletions