linux/tools/perf/tests
Namhyung Kim 35d13f841a perf bpf-filter: Fix a parsing error with comma
The previous change to support cgroup filters introduced a bug that
pathname can include commas.  It confused the lexer to treat an item and
the trailing comma as a single token.  And it resulted in a parse error:

  $ sudo perf record -e cycles:P --filter 'period > 0, ip > 64' -- true
  perf_bpf_filter: Error: Unexpected item: 0,
  perf_bpf_filter: syntax error, unexpected BFT_ERROR, expecting BFT_NUM

   Usage: perf record [<options>] [<command>]
      or: perf record [<options>] -- <command> [<options>]

          --filter <filter>
                            event filter

It should get "0" and "," separately.

An easiest fix would be to remove "," from the possible pathname
characters.  As it's for cgroup names, probably ok to assume it won't
have commas in the pathname.

I found that the existing BPF filtering test didn't have any complex
filter condition with commas.  Let's update the group filter test which
is supposed to test filter combinations like this.

Link: https://lore.kernel.org/r/20250307220922.434319-1-namhyung@kernel.org
Fixes: 91e88437d5 ("perf bpf-filter: Support filtering on cgroups")
Reported-by: Sally Shi <sshii@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-03-24 17:29:58 -07:00
..
config-fragments
shell perf bpf-filter: Fix a parsing error with comma 2025-03-24 17:29:58 -07:00
workloads perf tests: Fix data symbol test with LTO builds 2025-03-07 14:07:07 -08:00
api-io.c
backward-ring-buffer.c
bitmap.c
bp_account.c perf parse-events: Add default_breakpoint_len helper 2024-09-04 09:49:09 -03:00
bp_signal_overflow.c perf parse-events: Add default_breakpoint_len helper 2024-09-04 09:49:09 -03:00
bp_signal.c perf parse-events: Add default_breakpoint_len helper 2024-09-04 09:49:09 -03:00
Build perf build: Add pylint build tests 2025-03-24 09:38:20 -07:00
builtin-test.c perf test: Add a runs-per-test flag 2025-01-16 11:01:03 -08:00
code-reading.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
cpumap.c perf test cpumap: Avoid use-after-free following merge 2025-01-08 17:40:05 -03:00
demangle-java-test.c perf test: Use ARRAY_SIZE for array length 2024-09-30 12:59:42 -07:00
demangle-ocaml-test.c
dlfilter-test.c perf tool: Constify tool pointers 2024-08-12 18:05:14 -03:00
dso-data.c perf test dso-data: Correctly free test file in read test 2025-03-17 22:07:18 -07:00
dwarf-unwind.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
event_groups.c perf test: Update event_groups test to use instructions 2025-01-18 10:32:57 -08:00
event_update.c perf test: Fix leak in "Synthesize attr update" test 2025-03-06 15:59:41 -08:00
event-times.c perf test: Fix memory leaks on event-times error paths 2024-10-02 14:58:03 -07:00
evsel-roundtrip-name.c
evsel-tp-sched.c perf build: Include libtraceevent headers directly indicated by pkg-config 2024-11-08 22:42:57 -08:00
expand-cgroup.c
expr.c perf test expr: Fix system_tsc_freq for only x86 2024-12-11 09:19:44 -08:00
fdarray.c
genelf.c
hists_common.c
hists_common.h
hists_cumulate.c
hists_filter.c
hists_link.c
hists_output.c
hwmon_pmu.c perf test: Fix Hwmon PMU test endianess issue 2025-02-04 17:22:40 -08:00
is_printable_array.c
keep-tracking.c
kmod-path.c
make perf tools: Remove dependency on libaudit 2025-01-10 10:59:42 -03:00
maps.c
mem.c
mem2node.c
mmap-basic.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
mmap-thread-lookup.c perf test: Fix spelling mistake "sythesizing" -> "synthesizing" 2025-02-28 16:17:53 -08:00
openat-syscall-all-cpus.c
openat-syscall-tp-fields.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
openat-syscall.c
parse-events.c perf tests: Enable tests disabled due to tracepoint parsing 2024-12-09 17:52:42 -03:00
parse-metric.c
parse-no-sample-id-all.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
pe-file-parsing.c
pe-file.c
pe-file.exe
pe-file.exe.debug
perf-hooks.c
perf-record.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
perf-targz-src-pkg
perf-time-to-tsc.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
pfm.c
pmu-events.c perf pmus: Fake PMU clean up 2024-09-11 11:27:42 -03:00
pmu.c perf pmu: Rename name matching for no suffix or wildcard variants 2025-02-04 21:28:46 -08:00
python-use.c
sample-parsing.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
sdt.c
sigtrap.c perf btf: Make the sigtrap test helper to find a member by name widely available 2024-12-09 17:52:41 -03:00
stat.c perf stat: Move stat_config into config.c 2024-12-18 16:24:32 -03:00
sw-clock.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
switch-tracking.c perf sample: Make user_regs and intr_regs optional 2025-02-12 20:06:11 -08:00
symbols.c
task-exit.c perf test: Run parallel tests in two passes 2024-10-28 09:32:58 -07:00
tests-scripts.c perf tests: Fix an incorrect type in append_script() 2024-12-12 16:08:36 -03:00
tests-scripts.h
tests.h perf test: Introduce DEFINE_SUITE_EXCLUSIVE() 2024-12-13 16:55:09 -03:00
thread-map.c perf tool: Constify tool pointers 2024-08-12 18:05:14 -03:00
thread-maps-share.c
time-utils-test.c
tool_pmu.c perf tests: Fix Tool PMU test segfault 2025-02-12 19:34:56 -08:00
topology.c
unit_number__scnprintf.c
util.c
vmlinux-kallsyms.c perf map: API clean up 2024-08-19 14:49:53 -03:00
wp.c perf test: Make watchpoint data 32-bits on i386 2024-09-03 11:26:53 -03:00