From c020680d788e5ee842d392ecacaf518c45ba2206 Mon Sep 17 00:00:00 2001 From: Christian Loehle Date: Fri, 16 Aug 2024 12:02:28 +0100 Subject: [PATCH] lisa.trace: Run trace events discovery as root FIX Fix trace events discovery over ssh as non-root user by ensuring it runs with sudo if the user isn't root already. tracefs generally is drwx------ with root:root as owner, so force the events discovery using tracefs to run with sudo if the user isn't root already. Signed-off-by: Christian Loehle --- lisa/trace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisa/trace.py b/lisa/trace.py index 2d965b468..2f2405f94 100644 --- a/lisa/trace.py +++ b/lisa/trace.py @@ -7690,7 +7690,7 @@ class FtraceCollector(CollectorBase, Configurable): # trace-cmd start complains if given these events, even though they are # valid - avoided = set(target.list_directory(target.path.join(tracing_path, 'events', 'ftrace'))) + avoided = set(target.list_directory(target.path.join(tracing_path, 'events', 'ftrace'), as_root=True)) available = set( event.split(':', 1)[1] -- GitLab