summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYuichi Ito <ito.yuichi0@gmail.com>2014-04-15 14:53:12 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-04-15 14:54:14 +0900
commitd08389596189689505109dceb70075423eda9c8e (patch)
treea3f8f3c01533e949ad6e16057f8e928933bb53cf
parentbff600848874ac60041c4ad91e80bb61241cf723 (diff)
sw test tool: Correct the comparison method to treat matches as the set
OF 1.3.3 spec (3 Glossary) says: Flow Entry: an element in a flow table used to match and process packets. It contains a set of match fields for matching packets, a priority for matching precedence, a set of counters to track packets, and a set of instructions to apply (see 5.2). According to OF spec, the match fields are treated as the set. This means that the order of matches which flow_stats message returns is inconsistant. This patch corrects the comparison method of matches by sorting in a particular order before comparison. Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/switch/tester.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index 4b12e291..8954b211 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
@@ -810,8 +810,8 @@ class OfTester(app_manager.RyuApp):
value1 = sorted(value1)
value2 = sorted(value2)
elif attr == 'match':
- value1 = __reasm_match(value1)
- value2 = __reasm_match(value2)
+ value1 = sorted(__reasm_match(value1))
+ value2 = sorted(__reasm_match(value2))
if str(value1) != str(value2):
flow_stats = []
for attr in attr_list: