From patchwork Mon Sep 12 20:52:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarno Rajahalme X-Patchwork-Id: 668979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3sY0QT3v4vz9sdg for ; Tue, 13 Sep 2016 06:53:37 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 028D81063F; Mon, 12 Sep 2016 13:53:24 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id A51CB10629 for ; Mon, 12 Sep 2016 13:53:21 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 402E94203A8 for ; Mon, 12 Sep 2016 14:53:21 -0600 (MDT) X-ASG-Debug-ID: 1473713600-09eadd6c8134b90001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar5.cudamail.com with ESMTP id a3iEUsAHsrAkaTTW (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 12 Sep 2016 14:53:20 -0600 (MDT) X-Barracuda-Envelope-From: jarno@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO relay6-d.mail.gandi.net) (217.70.183.198) by mx3-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 12 Sep 2016 20:53:20 -0000 Received-SPF: pass (mx3-pf2.cudamail.com: SPF record at ovn.org designates 217.70.183.198 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.198 X-Barracuda-RBL-IP: 217.70.183.198 Received: from mfilter9-d.gandi.net (mfilter9-d.gandi.net [217.70.178.138]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id CA385FB882; Mon, 12 Sep 2016 22:53:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter9-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter9-d.gandi.net (mfilter9-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id bpmDZOZuItET; Mon, 12 Sep 2016 22:53:17 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from sc9-mailhost2.vmware.com (unknown [208.91.1.34]) (Authenticated sender: jarno@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 4182CFB883; Mon, 12 Sep 2016 22:53:15 +0200 (CEST) X-CudaMail-Envelope-Sender: jarno@ovn.org From: Jarno Rajahalme To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V2-911045876 X-CudaMail-DTE: 091216 X-CudaMail-Originating-IP: 217.70.183.198 Date: Mon, 12 Sep 2016 13:52:32 -0700 X-ASG-Orig-Subj: [##CM-V2-911045876##][PATCH v3 02/13] tests: Keyword fixes. Message-Id: <1473713563-107204-3-git-send-email-jarno@ovn.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1473713563-107204-1-git-send-email-jarno@ovn.org> References: <1473713563-107204-1-git-send-email-jarno@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1473713600 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH v3 02/13] tests: Keyword fixes. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" 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 Acked-by: Ben Pfaff --- v3: New patch for v3. tests/ofp-print.at | 58 ++++++++++++++++++++++++++++++++++++++---------------- tests/ofproto.at | 14 +++++-------- 2 files changed, 46 insertions(+), 26 deletions(-) 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])