linux/tools/perf/tests/shell
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
..
attr perf tools: Don't set attr.exclude_guest by default 2024-10-22 09:52:11 -07:00
base_probe perf test perftool_testsuite: Return correct value for skipping 2025-01-14 14:57:20 -03:00
base_report perf test: Add tests for latency and parallelism profiling 2025-02-18 14:04:32 -08:00
common perf test perftool_testsuite: Return correct value for skipping 2025-01-14 14:57:20 -03:00
coresight perf tools: annotate asm_pure_loop.S 2025-03-24 09:39:54 -07:00
lib perf test: Address attr.py mypy error 2025-03-24 09:38:20 -07:00
annotate.sh perf test: Add pipe output testing for annotate 2025-03-14 18:16:33 -07:00
attr.sh perf test: Move attr files into shell directory where they are used 2024-10-17 13:17:36 -07:00
buildid.sh perf tests shell: Fixed shellcheck warnings 2023-06-13 23:40:34 -03:00
daemon.sh perf test shell daemon: Make signal test less racy 2024-01-26 10:51:49 -03:00
diff.sh perf test: Fixes to variable expansion and stdout for diff test 2025-03-14 18:15:13 -07:00
ftrace.sh perf test: Update ftrace test to use --graph-opts 2025-01-08 17:20:42 -03:00
list.sh perf test: Avoid list test blocking on writing to stdout 2024-10-28 09:32:57 -07:00
lock_contention.sh perf test: Speed up some tests using perf list 2024-10-17 09:55:58 -07:00
perftool-testsuite_probe.sh perf test: Skip perf probe tests when running as non-root 2025-03-05 09:17:01 -08:00
perftool-testsuite_report.sh perf test: Tag parallel failing shell tests with "(exclusive)" 2024-10-28 09:32:58 -07:00
pipe_test.sh perf test: Fix perf test case 84 on s390 2024-10-19 09:39:54 -07:00
probe_vfs_getname.sh perf test: Skip perf probe tests when running as non-root 2025-03-05 09:17:01 -08:00
record+probe_libc_inet_pton.sh perf test: Skip perf probe tests when running as non-root 2025-03-05 09:17:01 -08:00
record+script_probe_vfs_getname.sh perf test: Skip perf probe tests when running as non-root 2025-03-05 09:17:01 -08:00
record+zstd_comp_decomp.sh perf tests record+zstd_comp_decomp: Fix the shellcheck warnings about word splitting/quoting 2023-08-03 17:01:27 -03:00
record.sh perf test: Use cycles event in perf record test for leader_sampling 2025-02-04 11:36:14 -08:00
record_bpf_filter.sh perf bpf-filter: Fix a parsing error with comma 2025-03-24 17:29:58 -07:00
record_lbr.sh perf test: Tag parallel failing shell tests with "(exclusive)" 2024-10-28 09:32:58 -07:00
record_offcpu.sh perf test: Tag parallel failing shell tests with "(exclusive)" 2024-10-28 09:32:58 -07:00
record_sideband.sh perf tests: Fix shellcheck warning in record_sideband.sh 2023-10-17 12:40:51 -07:00
script.sh perf test: Avoid python leak sanitizer test failures 2024-07-31 16:12:59 -03:00
stat+csv_output.sh perf test: Add --metric-only to perf stat output tests 2025-03-05 09:17:01 -08:00
stat+csv_summary.sh tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase 2023-09-26 21:47:12 -07:00
stat+json_output.sh perf test: Add --metric-only to perf stat output tests 2025-03-05 09:17:01 -08:00
stat+shadow_stat.sh tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh tetscase 2023-09-26 21:47:12 -07:00
stat+std_output.sh perf test: Add --metric-only to perf stat output tests 2025-03-05 09:17:01 -08:00
stat.sh perf test stat: Additional topdown grouping tests 2025-03-11 19:05:04 -07:00
stat_all_metricgroups.sh perf test: Be more tolerant of metricgroup failures 2024-09-24 10:46:24 -07:00
stat_all_metrics.sh perf test stat_all_metrics: Ensure missing events fail test 2025-02-12 19:54:40 -08:00
stat_all_pfm.sh perf test: Add test of libpfm4 events 2023-06-12 15:57:53 -03:00
stat_all_pmu.sh perf test stat_all_pmu.sh: Correctly check 'perf stat' result 2025-03-14 10:41:34 -07:00
stat_bpf_counters.sh perf test: Use sqrtloop workload to test bperf event 2024-11-01 23:31:08 -07:00
stat_bpf_counters_cgrp.sh perf test: Remove cpu-list BPF cgroup counter test 2024-11-04 22:10:48 -08:00
stat_metrics_values.sh perf test: Simplify metric value validation test final report 2024-02-01 22:16:37 -08:00
test_arm_callgraph_fp.sh perf test: Make test_arm_callgraph_fp.sh more robust 2024-06-24 14:42:59 -07:00
test_arm_coresight.sh perf test: Tag parallel failing shell tests with "(exclusive)" 2024-10-28 09:32:58 -07:00
test_arm_coresight_disasm.sh perf test: Tag parallel failing shell tests with "(exclusive)" 2024-10-28 09:32:58 -07:00
test_arm_spe.sh perf tests arm_spe: Add test for discard mode 2025-01-13 11:45:05 -03:00
test_arm_spe_fork.sh perf test: Speed up some tests using perf list 2024-10-17 09:55:58 -07:00
test_brstack.sh perf test brstack: Speed up running test by using tr -s instead of xargs 2025-01-14 14:57:19 -03:00
test_data_symbol.sh perf tests: Fix data symbol test with LTO builds 2025-03-07 14:07:07 -08:00
test_intel_pt.sh perf intel-pt: Add a test for pause / resume 2024-12-18 16:24:32 -03:00
test_java_symbol.sh perf test java symbol: Remove needless debuginfod queries 2023-05-10 12:54:53 -03:00
test_perf_data_converter_json.sh perf test: Use common python setup library 2023-12-05 15:48:52 -03:00
test_stat_intel_tpebs.sh perf test: Extra verbosity and hypervisor skip for tpebs test 2025-02-03 19:45:50 -08:00
test_task_analyzer.sh perf tests shell task_analyzer: Run this test exclusively 2025-01-08 17:20:42 -03:00
test_uprobe_from_different_cu.sh perf test: Skip perf probe tests when running as non-root 2025-03-05 09:17:01 -08:00
trace+probe_vfs_getname.sh perf test: Skip perf trace tests when running as non-root 2025-03-05 09:17:01 -08:00
trace_btf_enum.sh perf test: Skip perf trace tests when running as non-root 2025-03-05 09:17:01 -08:00
trace_btf_general.sh perf test: Skip perf trace tests when running as non-root 2025-03-05 09:17:01 -08:00
trace_exit_race.sh perf test: Skip perf trace tests when running as non-root 2025-03-05 09:17:01 -08:00
trace_record_replay.sh perf test: Add trace record and replay test 2025-03-05 09:17:01 -08:00