[DTrace-devel] [PATCH] test: Loosen some tolerances on tests

Kris Van Hees kris.van.hees at oracle.com
Wed Mar 1 02:32:49 UTC 2023


On Tue, Feb 28, 2023 at 01:52:27AM -0500, eugene.loh--- via DTrace-devel wrote:
> From: Eugene Loh <eugene.loh at oracle.com>
> 
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>

> ---
>  test/unittest/cpc/tst.mode_kernel.sh  | 2 +-
>  test/unittest/cpc/tst.mode_user.sh    | 2 +-
>  test/unittest/funcs/tst.rand_inter.sh | 2 +-
>  test/unittest/funcs/tst.rand_intra.sh | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/test/unittest/cpc/tst.mode_kernel.sh b/test/unittest/cpc/tst.mode_kernel.sh
> index f7a356cd..a9b88228 100755
> --- a/test/unittest/cpc/tst.mode_kernel.sh
> +++ b/test/unittest/cpc/tst.mode_kernel.sh
> @@ -59,7 +59,7 @@ for eventname in `$utils/cpc_get_events.sh`; do
>  	done
>  
>  	# report
> -	margin=$(($expect / 4))
> +	margin=$(($expect / 3))
>  	$utils/check_result.sh ${actual[all]}    $expect $margin; status=$(($status + $?))
>  	$utils/check_result.sh ${actual[user]}      0    $margin; status=$(($status + $?))
>  	$utils/check_result.sh ${actual[kernel]} $expect $margin; status=$(($status + $?))
> diff --git a/test/unittest/cpc/tst.mode_user.sh b/test/unittest/cpc/tst.mode_user.sh
> index a445b734..393574b3 100755
> --- a/test/unittest/cpc/tst.mode_user.sh
> +++ b/test/unittest/cpc/tst.mode_user.sh
> @@ -59,7 +59,7 @@ for eventname in `$utils/cpc_get_events.sh`; do
>  	done
>  
>  	# report
> -	margin=$(($expect / 4))
> +	margin=$(($expect / 3))
>  	$utils/check_result.sh ${actual[all]}    $expect $margin; status=$(($status + $?))
>  	$utils/check_result.sh ${actual[user]}   $expect $margin; status=$(($status + $?))
>  	$utils/check_result.sh ${actual[kernel]}    0    $margin; status=$(($status + $?))
> diff --git a/test/unittest/funcs/tst.rand_inter.sh b/test/unittest/funcs/tst.rand_inter.sh
> index adbfb72f..132611c1 100755
> --- a/test/unittest/funcs/tst.rand_inter.sh
> +++ b/test/unittest/funcs/tst.rand_inter.sh
> @@ -154,7 +154,7 @@ awk '
>              print "ERROR: found too many bins outside three sigma";
>              exit 1;
>          }
> -        if (noutlier4 > 0) {
> +        if (noutlier4 > 1) {
>              print "ERROR: found too many bins outside four sigma";
>              exit 1;
>          }
> diff --git a/test/unittest/funcs/tst.rand_intra.sh b/test/unittest/funcs/tst.rand_intra.sh
> index 91427711..f086c0d7 100755
> --- a/test/unittest/funcs/tst.rand_intra.sh
> +++ b/test/unittest/funcs/tst.rand_intra.sh
> @@ -135,7 +135,7 @@ awk '
>              print "ERROR: found too many bins outside three sigma";
>              exit 1;
>          }
> -        if (noutlier4 > 0) {
> +        if (noutlier4 > 1) {
>              print "ERROR: found too many bins outside four sigma";
>              exit 1;
>          }
> -- 
> 2.18.4
> 
> 
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel



More information about the DTrace-devel mailing list