diff mbox

[ovs-dev,v3,02/13] tests: Keyword fixes.

Message ID 1473713563-107204-3-git-send-email-jarno@ovn.org
State Accepted
Headers show

Commit Message

Jarno Rajahalme Sept. 12, 2016, 8:52 p.m. UTC
Add "bundle" keyword to ofp-print.at tests about bundle messages.
Add a missing ofp-print.at test for bundle group mods.
Remove "monitor" keyword from ofproto.at tests that do not use a monitor.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
---
v3: New patch for v3.

 tests/ofp-print.at | 58 ++++++++++++++++++++++++++++++++++++++----------------
 tests/ofproto.at   | 14 +++++--------
 2 files changed, 46 insertions(+), 26 deletions(-)

Comments

Ben Pfaff Sept. 13, 2016, 6:01 p.m. UTC | #1
On Mon, Sep 12, 2016 at 01:52:32PM -0700, Jarno Rajahalme wrote:
> Add "bundle" keyword to ofp-print.at tests about bundle messages.
> Add a missing ofp-print.at test for bundle group mods.
> Remove "monitor" keyword from ofproto.at tests that do not use a monitor.
> 
> Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
> ---
> v3: New patch for v3.

Acked-by: Ben Pfaff <blp@ovn.org>
diff mbox

Patch

diff --git a/tests/ofp-print.at b/tests/ofp-print.at
index ff1df39..5d2040b 100644
--- a/tests/ofp-print.at
+++ b/tests/ofp-print.at
@@ -3339,8 +3339,8 @@  NXST_FLOW_MONITOR reply (xid=0x4):
 AT_CLEANUP
 
 
-AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REQUEST])
-AT_KEYWORDS([ofp-print])
+AT_SETUP([OFPT_BUNDLE_CONTROL - atomic OPEN_REQUEST])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 00 00 01 \
@@ -3350,8 +3350,8 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 ])
 AT_CLEANUP
 
-AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REQUEST])
-AT_KEYWORDS([ofp-print])
+AT_SETUP([OFPT_BUNDLE_CONTROL - ordered OPEN_REQUEST])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 00 00 02 \
@@ -3361,8 +3361,8 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 ])
 AT_CLEANUP
 
-AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REQUEST])
-AT_KEYWORDS([ofp-print])
+AT_SETUP([OFPT_BUNDLE_CONTROL - atomic ordered OPEN_REQUEST])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 00 00 03 \
@@ -3373,7 +3373,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REPLY])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 01 00 01 \
@@ -3384,7 +3384,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_CONTROL - CLOSE_REQUEST])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 02 00 01 \
@@ -3395,7 +3395,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_CONTROL - CLOSE_REPLY])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 03 00 01 \
@@ -3406,7 +3406,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_CONTROL - COMMIT_REQUEST])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 04 00 01 \
@@ -3417,7 +3417,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_CONTROL - COMMIT_REPLY])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 05 00 01 \
@@ -3428,7 +3428,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_CONTROL - DISCARD_REQUEST])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 06 00 01 \
@@ -3439,7 +3439,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_CONTROL - DISCARD_REPLY])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 21 00 10 00 00 00 00 \
 00 00 00 01 00 07 00 01 \
@@ -3450,7 +3450,7 @@  OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - verify xid])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 22 00 20 00 00 00 00 00 00 00 01 00 00 00 01 \
 05 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 \
@@ -3460,7 +3460,7 @@  OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x0): ***decode error: OFPBFC_MSG_BAD_XID**
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - reject OFPT_HELLO])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
 05 22 00 20 00 00 00 00 00 00 00 01 00 00 00 01 \
 05 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 \
@@ -3472,7 +3472,7 @@  ofp_util|WARN|OFPT_HELLO message not allowed inside OFPT14_BUNDLE_ADD_MESSAGE
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - FLOW_MOD])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 22 00 a0 00 00 00 02 00 00 00 01 00 00 00 01 \
 05 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
@@ -3492,7 +3492,7 @@  OFPT_FLOW_MOD (OF1.4) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_t
 AT_CLEANUP
 
 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - PORT_MOD])
-AT_KEYWORDS([ofp-print])
+AT_KEYWORDS([ofp-print bundle])
 AT_CHECK([ovs-ofctl ofp-print "\
 05 22 00 38 00 00 00 03 00 00 00 01 00 00 00 01 \
 05 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
@@ -3508,6 +3508,30 @@  OFPT_PORT_MOD (OF1.4) (xid=0x3): port: 3: addr:50:54:00:00:00:01
 ])
 AT_CLEANUP
 
+AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - GROUP_MOD])
+AT_KEYWORDS([ofp-print bundle])
+AT_CHECK([ovs-ofctl ofp-print "\
+06 22 00 c8 00 00 00 03 00 00 00 01 00 00 00 01 \
+06 0f 00 b8 00 00 00 03 00 00 01 00 87 65 43 21 \
+00 78 00 00 ff ff ff ff 00 28 00 10 00 00 00 00 \
+00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
+00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 \
+00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
+00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
+00 01 00 08 00 00 00 02 00 28 00 10 00 00 00 02 \
+00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
+00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 \
+ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 \
+68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
+00 00 00 00 00 00 00 07 \
+"], [0], [dnl
+OFPT_BUNDLE_ADD_MESSAGE (OF1.5) (xid=0x3):
+ bundle_id=0x1 flags=atomic
+OFPT_GROUP_MOD (OF1.5) (xid=0x3):
+ ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
+])
+AT_CLEANUP
+
 AT_SETUP([NXST_IPFIX_BRIDGE - request])
 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
 AT_CHECK([ovs-ofctl ofp-print "\
diff --git a/tests/ofproto.at b/tests/ofproto.at
index a849c43..6901565 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -7,6 +7,7 @@  OVS_VSWITCHD_STOP
 AT_CLEANUP
 
 AT_SETUP([ofproto - handling messages with bad version])
+AT_KEYWORDS([monitor])
 OVS_VSWITCHD_START
 
 # Start a monitor running OpenFlow 1.0, then send the switch an OF1.1 features
@@ -4582,7 +4583,7 @@  OVS_VSWITCHD_START
 ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
 AT_CAPTURE_FILE([monitor.log])
 
-# Open, Close, Close
+# Open, Close
 ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
 ovs-appctl -t ovs-ofctl ofctl/barrier
 ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 02 00 01"
@@ -4614,7 +4615,7 @@  OVS_VSWITCHD_START
 ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
 AT_CAPTURE_FILE([monitor.log])
 
-# Open, Close, Close
+# Commit
 ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 04 00 02"
 ovs-appctl -t ovs-ofctl ofctl/barrier
 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
@@ -4639,7 +4640,7 @@  OVS_VSWITCHD_START
 ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
 AT_CAPTURE_FILE([monitor.log])
 
-# Open, Close, Close
+# Open, Commit
 ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 00 00 02"
 ovs-appctl -t ovs-ofctl ofctl/barrier
 ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 04 00 01"
@@ -4671,7 +4672,7 @@  OVS_VSWITCHD_START
 ovs-ofctl -O OpenFlow14 monitor br0 --detach --no-chdir --pidfile >monitor.log 2>&1
 AT_CAPTURE_FILE([monitor.log])
 
-# Open, Close, Close
+# Discard
 ovs-appctl -t ovs-ofctl ofctl/send "05 21 00 10 00 00 00 0a 00 00 00 01 00 06 00 02"
 ovs-appctl -t ovs-ofctl ofctl/barrier
 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
@@ -4690,7 +4691,6 @@  AT_CLEANUP
 
 
 AT_SETUP([ofproto - bundle with multiple flow mods (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
 OVS_VSWITCHD_START
 
 AT_CHECK([ovs-appctl vlog/set vconn:dbg])
@@ -4887,7 +4887,6 @@  AT_CLEANUP
 
 
 AT_SETUP([ofproto - failing bundle commit (OpenFlow 1.4)])
-AT_KEYWORDS([monitor])
 OVS_VSWITCHD_START
 
 AT_CHECK([ovs-ofctl del-flows br0])
@@ -5175,7 +5174,6 @@  AT_CLEANUP
 
 
 AT_SETUP([ofproto - bundle with multiple flow mods (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
 OVS_VSWITCHD_START
 
 AT_CHECK([ovs-appctl vlog/set vconn:dbg])
@@ -5372,7 +5370,6 @@  AT_CLEANUP
 
 
 AT_SETUP([ofproto - failing bundle add message (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
 OVS_VSWITCHD_START
 
 AT_CHECK([ovs-ofctl del-flows br0])
@@ -5420,7 +5417,6 @@  AT_CLEANUP
 
 
 AT_SETUP([ofproto - failing bundle commit (OpenFlow 1.3)])
-AT_KEYWORDS([monitor])
 OVS_VSWITCHD_START
 
 AT_CHECK([ovs-ofctl del-flows br0])