diff mbox

[ovs-dev] tests/bundle: Use active_backup algorithm for up/down test.

Message ID 1481024923-11343-1-git-send-email-i.maximets@samsung.com
State Accepted
Headers show

Commit Message

Ilya Maximets Dec. 6, 2016, 11:48 a.m. UTC
HRW algorithm uses hash function which is dependent from the build
environment. This leads to constant fails of the testsuite
with CFLAGS='-march=native' if CPU supports hashing instructions:

[-------------------------------------------------------------------]
 ./bundle.at:233: ovs-appctl ofproto/trace br0 \
     'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'
 stdout:
 Bridge: br0
 Flow: in_port=LOCAL,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,\
       dl_dst=50:54:00:00:00:06,dl_type=0x0000

 Rule: table=0 cookie=0
 OpenFlow actions=bundle(eth_src,50,hrw,ofport,slaves:1,2)

 Final flow: unchanged
 Megaflow: recirc_id=0,in_port=LOCAL,dl_src=50:54:00:00:00:05, \
           dl_type=0x0000
 Datapath actions: 2
 ./bundle.at:234: tail -1 stdout
 --- -
 +++ /testsuite.dir/at-groups/85/stdout
 @@ -1,2 +1,2 @@
 -Datapath actions: 1
 +Datapath actions: 2

[-------------------------------------------------------------------]

Using of 'active_backup' algorithm will help to avoid such issues.

CC: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Fixes: 63460a30c53e ("tests/bundle: test bundle action with ports up and down")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 tests/bundle.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Pfaff Dec. 6, 2016, 4:53 p.m. UTC | #1
On Tue, Dec 06, 2016 at 02:48:43PM +0300, Ilya Maximets wrote:
> HRW algorithm uses hash function which is dependent from the build
> environment. This leads to constant fails of the testsuite
> with CFLAGS='-march=native' if CPU supports hashing instructions:

Thanks, applied to master.
diff mbox

Patch

diff --git a/tests/bundle.at b/tests/bundle.at
index 11c9713..0b6a192 100644
--- a/tests/bundle.at
+++ b/tests/bundle.at
@@ -227,7 +227,7 @@  OVS_VSWITCHD_START([dnl
     add-port br0 p2 -- set Interface p2 type=dummy -- \
     set Interface p2 ofport_request=2
 ])
-AT_CHECK([ovs-ofctl add-flow br0 'actions=bundle(eth_src,50,hrw,ofport,slaves:1,2)'])
+AT_CHECK([ovs-ofctl add-flow br0 'actions=bundle(eth_src,50,active_backup,ofport,slaves:1,2)'])
 AT_CHECK([ovs-ofctl mod-port br0 p1 up])
 AT_CHECK([ovs-ofctl mod-port br0 p2 up])
 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout])