Skip to content
Commit fa52d995 authored by Veronika Molnarova's avatar Veronika Molnarova Committed by Namhyung Kim
Browse files

perf test stat+shadow_stat.sh: Add threshold for rounding errors



The test was failing in specific scenarios due to imperfection of FP
arithmetics. The `bc` command wasn't correctly rounding the result of
division causing the failure.

Replace the `bc` with `awk` which should work with more decimal places
and add a threshold to catch any possible rounding errors.  The
acceptable rounding error is set to 0.01 when the test passes with a
warning message.

Signed-off-by: default avatarVeronika Molnarova <vmolnaro@redhat.com>
Acked-by: default avatarMichael Petlan <mpetlan@redhat.com>
Link: https://lore.kernel.org/r/20230919150419.23193-1-vmolnaro@redhat.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent e49be27e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment