diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2024-01-08 11:40:09 +0300 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2024-01-22 23:08:19 +0300 |
commit | 999eea92e8d7a1ffa83f7dc89c83d8ed1e746fa9 (patch) | |
tree | 16c33ebb7331f2fe72888775ff2ea9eba48307f5 /tools/perf/tests/shell/stat_bpf_counters.sh | |
parent | 6613476e225e090cc9aad49be7fa504e290dd33d (diff) | |
download | linux-999eea92e8d7a1ffa83f7dc89c83d8ed1e746fa9.tar.xz |
perf test: raise limit to 20 percent for perf_stat_--bpf-counters_test
This test case often fails on s390 (about 2 out of 10) because the
10% percent limit on the difference between --bpf-counters event counting
and s390 hardware counting is more than 10% in all failure cases.
Raise the limit to 20% on s390 and the test case succeeds.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: gor@linux.ibm.com
Cc: hca@linux.ibm.com
Cc: sumanthk@linux.ibm.com
Cc: svens@linux.ibm.com
Link: https://lore.kernel.org/r/20240108084009.3959211-1-tmricht@linux.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/tests/shell/stat_bpf_counters.sh')
-rwxr-xr-x | tools/perf/tests/shell/stat_bpf_counters.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/tests/shell/stat_bpf_counters.sh b/tools/perf/tests/shell/stat_bpf_counters.sh index a87bb2814b4c..2d9209874774 100755 --- a/tools/perf/tests/shell/stat_bpf_counters.sh +++ b/tools/perf/tests/shell/stat_bpf_counters.sh @@ -4,19 +4,19 @@ set -e -# check whether $2 is within +/- 10% of $1 +# check whether $2 is within +/- 20% of $1 compare_number() { first_num=$1 second_num=$2 - # upper bound is first_num * 110% - upper=$(expr $first_num + $first_num / 10 ) - # lower bound is first_num * 90% - lower=$(expr $first_num - $first_num / 10 ) + # upper bound is first_num * 120% + upper=$(expr $first_num + $first_num / 5 ) + # lower bound is first_num * 80% + lower=$(expr $first_num - $first_num / 5 ) if [ $second_num -gt $upper ] || [ $second_num -lt $lower ]; then - echo "The difference between $first_num and $second_num are greater than 10%." + echo "The difference between $first_num and $second_num are greater than 20%." exit 1 fi } |