summaryrefslogtreecommitdiff
path: root/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/shell/stat_bpf_counters_cgrp.sh')
-rwxr-xr-xtools/perf/tests/shell/stat_bpf_counters_cgrp.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh b/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
index ff2e06c408bc..febe3af06441 100755
--- a/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
+++ b/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
@@ -58,9 +58,24 @@ check_system_wide_counted()
fi
}
+# Missing flags in evlist__clone() resulted in different output.
+# Just check the number of output lines for simple verification.
+check_evlist_expand()
+{
+ normal_output=$(perf stat -a -x, true 2>&1 | wc -l)
+ expand_output=$(perf stat -a -x, --bpf-counters --for-each-cgroup / true 2>&1 | wc -l)
+ if [ "${normal_output}" != "${expand_output}" ]; then
+ if [ "${verbose}" = "1" ]; then
+ echo "Normal output has ${normal_output} lines, but it now has ${expand_output}"
+ fi
+ exit 1
+ fi
+}
+
check_bpf_counter
find_cgroups
check_system_wide_counted
+check_evlist_expand
exit 0