Re: [Autotest] [AUTOTEST PATCH] KVM-test: Convert drift to absolute value when comparing with threshold

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 29, 2009 at 7:27 AM, Amos Kong <akong@xxxxxxxxxx> wrote:
> If drift is a large negative, it couldn't raise exception.

Applied, thanks!

> Signed-off-by: Amos Kong <akong@xxxxxxxxxx>
> ---
>  client/tests/kvm/tests/timedrift.py |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/client/tests/kvm/tests/timedrift.py b/client/tests/kvm/tests/timedrift.py
> index 146fa12..0a211f5 100644
> --- a/client/tests/kvm/tests/timedrift.py
> +++ b/client/tests/kvm/tests/timedrift.py
> @@ -166,8 +166,8 @@ def run_timedrift(test, params, env):
>     logging.info("Total drift after rest: %.2f%%" % drift_total)
>
>     # Fail the test if necessary
> -    if drift > drift_threshold:
> +    if abs(drift) > drift_threshold:
>         raise error.TestFail("Time drift too large: %.2f%%" % drift)
> -    if drift_total > drift_threshold_after_rest:
> +    if abs(drift_total) > drift_threshold_after_rest:
>         raise error.TestFail("Time drift too large after rest period: %.2f%%"
>                              % drift_total)
> --
> 1.5.6.5
>
> _______________________________________________
> Autotest mailing list
> Autotest@xxxxxxxxxxxxxxx
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>



-- 
Lucas
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux