]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf test: Skip perf trace tests when running as non-root
authorNamhyung Kim <namhyung@kernel.org>
Tue, 4 Mar 2025 02:28:34 +0000 (18:28 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 5 Mar 2025 17:17:01 +0000 (09:17 -0800)
commit38672c5033c3aebcc4e3adb050fa80f4c393d345
tree20214752c8a7c8a004a816fe9d336992ab0bb58d
parent3fb29a7514e727ca1034a651f422ecc12109175c
perf test: Skip perf trace tests when running as non-root

perf trace requires root because it needs to use tracepoints and BPF.
Skip those test when it's not run as root.

Before:
  $ perf test trace
   15: Parse sched tracepoints fields                                  : Skip (permissions)
   80: perf ftrace tests                                               : Skip
  105: perf trace enum augmentation tests                              : FAILED!
  106: perf trace BTF general tests                                    : FAILED!
  107: perf trace exit race                                            : FAILED!
  118: probe libc's inet_pton & backtrace it with ping                 : Skip
  125: Check Arm CoreSight trace data recording and synthesized samples: Skip
  127: Check Arm SPE trace data recording and synthesized samples      : Skip
  132: Check open filename arg using perf trace + vfs_getname          : FAILED!

After:
  $ perf test trace
   15: Parse sched tracepoints fields                                  : Skip (permissions)
   80: perf ftrace tests                                               : Skip
  105: perf trace enum augmentation tests                              : Skip
  106: perf trace BTF general tests                                    : Skip
  107: perf trace exit race                                            : Skip
  118: probe libc's inet_pton & backtrace it with ping                 : Skip
  125: Check Arm CoreSight trace data recording and synthesized samples: Skip
  127: Check Arm SPE trace data recording and synthesized samples      : Skip
  132: Check open filename arg using perf trace + vfs_getname          : Skip

Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Link: https://lore.kernel.org/r/20250304022837.1877845-4-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/shell/trace+probe_vfs_getname.sh
tools/perf/tests/shell/trace_btf_enum.sh
tools/perf/tests/shell/trace_btf_general.sh
tools/perf/tests/shell/trace_exit_race.sh