diff mbox series

perf test stat_bpf_counters_cgrp: Remove cpu-list BPF counter test

Message ID 20241101102812.576425-1-mpetlan@redhat.com (mailing list archive)
State Not Applicable
Delegated to: BPF
Headers show
Series perf test stat_bpf_counters_cgrp: Remove cpu-list BPF counter test | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Michael Petlan Nov. 1, 2024, 10:28 a.m. UTC
The cpu-list part of this testcase has proven itself to be unreliable.
Sometimes, we get "<not counted>" for system.slice when pinned to CPUs
0 and 1. In such case, the test fails.

Since we cannot simply guarantee that any system.slice load will run
on any arbitrary list of CPUs, except the whole set of all CPUs, let's
rather remove the cpu-list subtest.

Fixes: a84260e314029e6dc9904fd ("perf test stat_bpf_counters_cgrp: Enhance perf stat cgroup BPF counter test")

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
---
 tools/perf/tests/shell/stat_bpf_counters_cgrp.sh | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Namhyung Kim Nov. 5, 2024, 4:41 p.m. UTC | #1
On Fri, 01 Nov 2024 11:28:12 +0100, Michael Petlan wrote:

> The cpu-list part of this testcase has proven itself to be unreliable.
> Sometimes, we get "<not counted>" for system.slice when pinned to CPUs
> 0 and 1. In such case, the test fails.
> 
> Since we cannot simply guarantee that any system.slice load will run
> on any arbitrary list of CPUs, except the whole set of all CPUs, let's
> rather remove the cpu-list subtest.
> 
> [...]

Applied to perf-tools-next, thanks!

Best regards,
Namhyung
diff mbox series

Patch

diff --git a/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh b/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
index e75d0780dc78..2ec69060c42f 100755
--- a/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
+++ b/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
@@ -58,22 +58,9 @@  check_system_wide_counted()
 	fi
 }
 
-check_cpu_list_counted()
-{
-	check_cpu_list_counted_output=$(perf stat -C 0,1 --bpf-counters --for-each-cgroup ${test_cgroups} -e cpu-clock -x, taskset -c 1 sleep 1  2>&1)
-	if echo ${check_cpu_list_counted_output} | grep -q -F "<not "; then
-		echo "Some CPU events are not counted"
-		if [ "${verbose}" = "1" ]; then
-			echo ${check_cpu_list_counted_output}
-		fi
-		exit 1
-	fi
-}
-
 check_bpf_counter
 find_cgroups
 
 check_system_wide_counted
-check_cpu_list_counted
 
 exit 0