Skip to content

Commit

Permalink
tests: Fix ovs-ofctl rule with importance test case.
Browse files Browse the repository at this point in the history
Sort the flow dump results to always have them in consistent order.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
Jarno Rajahalme committed Nov 12, 2014
1 parent a36de77 commit a56dd71
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/ovs-ofctl.at
Expand Up @@ -2765,17 +2765,15 @@ AT_CHECK([ovs-ofctl -O OpenFlow14 add-flow br0 priority=21,importance=21,actions
AT_CHECK([ovs-ofctl add-flow br0 priority=22,importance=22,actions=normal])

dnl Importance parameter will only be visible of flows that are added via OF1.4+ if dumped via OF1.4+
AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip], [0], [dnl
OFPST_FLOW reply (OF1.4):
priority=22 actions=NORMAL
AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
importance=21, priority=21 actions=NORMAL
priority=22 actions=NORMAL
])

dnl Importance parameter will not be visible if flow is dumped with previous version prior to OF1.4+ whether added via OF1.4+
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
NXST_FLOW reply:
priority=22 actions=NORMAL
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
priority=21 actions=NORMAL
priority=22 actions=NORMAL
])

OVS_VSWITCHD_STOP
Expand Down

0 comments on commit a56dd71

Please sign in to comment.