On Fri, Feb 07, 2014 at 12:41:50PM +0900, Yuichi Ito wrote:
> according to OF spec, the instruction is treated as the set.
> this means that the order of instructions which flow_stat message returns is 
> inconstant.
> this patch corrects the comparison method of instructions by sorting in a 
> particular order before comparison.
> 
> Signed-off-by: Yuichi Ito <[email protected]>

Reviewed-by: Simon Horman <[email protected]>

> ---
>  ryu/tests/switch/tester.py |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
> index 519a763..7ae16a5 100644
> --- a/ryu/tests/switch/tester.py
> +++ b/ryu/tests/switch/tester.py
> @@ -547,6 +547,9 @@ class OfTester(app_manager.RyuApp):
>          for attr in attr_list:
>              value1 = getattr(stats1, attr)
>              value2 = getattr(stats2, attr)
> +            if attr == 'instructions':
> +                value1 = sorted(value1)
> +                value2 = sorted(value2)
>              if str(value1) != str(value2):
>                  flow_stats = []
>                  for attr in attr_list:
> --
> 1.7.10.4
> 
> 
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to