From 120cf2893a4cc8871dc55c56ce019301f55cad3d Mon Sep 17 00:00:00 2001 From: kubi Date: Tue, 28 Jul 2015 09:17:02 +0000 Subject: Fix a bug for algorithm of arithmetic runner. since value will overstep the stop value under some condition JIRA:YARDSTICK-97 Change-Id: I11656206fc9b576283d243a3be249276dba03759 Signed-off-by: kubi --- yardstick/benchmark/runners/arithmetic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 yardstick/benchmark/runners/arithmetic.py (limited to 'yardstick/benchmark/runners') diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py old mode 100644 new mode 100755 index 9efafffec..f73d1cd0c --- a/yardstick/benchmark/runners/arithmetic.py +++ b/yardstick/benchmark/runners/arithmetic.py @@ -48,8 +48,9 @@ def _worker_process(queue, cls, method_name, context, scenario_args): sla_action = None if "sla" in scenario_args: sla_action = scenario_args["sla"].get("action", "assert") + margin = 1 if step > 0 else -1 - for value in range(start, stop+step, step): + for value in range(start, stop+margin, step): options[arg_name] = value -- cgit 1.2.3-korg