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

perf trace requires root because it needs to use [ku]probes.
Skip those test when it's not run as root.

Before:
  $ perf test probe
   47: Probe SDT events                                                : Ok
  104: test perf probe of function from different CU                   : FAILED!
  115: perftool-testsuite_probe                                        : FAILED!
  117: Add vfs_getname probe to get syscall args filenames             : FAILED!
  118: probe libc's inet_pton & backtrace it with ping                 : FAILED!
  119: Use vfs_getname probe to get syscall args filenames             : FAILED!

After:
  $ perf test probe
   47: Probe SDT events                                                : Ok
  104: test perf probe of function from different CU                   : Skip
  115: perftool-testsuite_probe                                        : Skip
  117: Add vfs_getname probe to get syscall args filenames             : Skip
  118: probe libc's inet_pton & backtrace it with ping                 : Skip
  119: Use vfs_getname probe to get syscall args filenames             : Skip

Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20250304022837.1877845-3-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/tests/shell/perftool-testsuite_probe.sh
tools/perf/tests/shell/probe_vfs_getname.sh
tools/perf/tests/shell/record+probe_libc_inet_pton.sh
tools/perf/tests/shell/record+script_probe_vfs_getname.sh
tools/perf/tests/shell/test_uprobe_from_different_cu.sh