Skip to content

Commit

Permalink
tests: Keyword fixes.
Browse files Browse the repository at this point in the history
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>
Acked-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
jrajahalme committed Sep 15, 2016
1 parent 82bde5b commit 5129991
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 26 deletions.
58 changes: 41 additions & 17 deletions tests/ofp-print.at
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 "\
Expand Down
14 changes: 5 additions & 9 deletions tests/ofproto.at
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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])
Expand All @@ -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"
Expand Down Expand Up @@ -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])
Expand All @@ -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])
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit 5129991

Please sign in to comment.