ofp-actions: Support mixing "conjunction" and "note" actions.
[cascardo/ovs.git] / tests / classifier.at
index 1e75123..3520acd 100644 (file)
@@ -289,3 +289,20 @@ for src in 0 1 2 3; do
 done
 OVS_VSWITCHD_STOP
 AT_CLEANUP
+
+AT_SETUP([conjunctive match and other actions])
+OVS_VSWITCHD_START
+# It's OK to use "conjunction" actions with "note" actions.
+AT_CHECK([ovs-ofctl add-flow br0 'actions=conjunction(3,1/2),note:41.42.43.44.45.46'])
+AT_CHECK([ovs-ofctl add-flow br0 'actions=note:41.42.43.44.45.46,conjunction(3,1/2)'])
+# It's not OK to use "conjunction" actions with other types of actions.
+AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' add-flow br0 'actions=output:1,conjunction(3,1/2)'], [1], [], [dnl
+ofp_actions|WARN|"conjunction" actions may be used along with "note" but not any other kind of action (such as the "output" action used here)
+ovs-ofctl: Incorrect instruction ordering
+])
+AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' add-flow br0 'actions=conjunction(3,1/2),output:1'], [1], [], [dnl
+ofp_actions|WARN|"conjunction" actions may be used along with "note" but not any other kind of action (such as the "output" action used here)
+ovs-ofctl: Incorrect instruction ordering
+])
+OVS_VSWITCHD_STOP
+AT_CLEANUP