These tests break if OVS internal hash function is changed. Some of
this is due to dependency on the order in which elements are iterated
from hash maps, or the algorithm used is just dependent on the
specific hash values produced for specific inputs (groups). These
changes make these test cases more robust, so that they will not break
so easily due to OVS internal hash function implementation changes.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
set bridge br-sw datapath-type=dummy \
other-config:hwaddr=aa:55:aa:58:00:00 -- \
add-port br-sw p1-sw -- set Interface p1-sw type=patch \
set bridge br-sw datapath-type=dummy \
other-config:hwaddr=aa:55:aa:58:00:00 -- \
add-port br-sw p1-sw -- set Interface p1-sw type=patch \
+ options:peer=p1 ofport_request=2 -- \
add-port br-sw p0-sw -- set Interface p0-sw type=patch \
add-port br-sw p0-sw -- set Interface p0-sw type=patch \
+ options:peer=p0 ofport_request=1 -- \
add-port br-bfd1 p1 -- set Interface p1 type=patch \
options:peer=p1-sw bfd:enable=true -- \
add-port br-bfd0 p0 -- set Interface p0 type=patch \
add-port br-bfd1 p1 -- set Interface p1 type=patch \
options:peer=p1-sw bfd:enable=true -- \
add-port br-bfd0 p0 -- set Interface p0 type=patch \
AT_SETUP([ofproto-dpif - select group with weight])
OVS_VSWITCHD_START
ADD_OF_PORTS([br0], [1], [10], [11], [12])
AT_SETUP([ofproto-dpif - select group with weight])
OVS_VSWITCHD_START
ADD_OF_PORTS([br0], [1], [10], [11], [12])
-AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11,weight=2,bucket=output:12,weight=0'])
+AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11,weight=2000,bucket=output:12,weight=0'])
AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
AT_CHECK([tail -1 stdout], [0],
AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
AT_CHECK([tail -1 stdout], [0],
ovs-appctl time/warp 10000
AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
ovs-appctl time/warp 10000
AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
-AT_CHECK([sed 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/' stdout], [0],
+AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
-OFPST_PORT reply (OF1.3) (xid=0x2): 3 ports
- port 1: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=0, bytes=0, drop=0, errs=0, coll=0
- port 2: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=0, bytes=0, drop=0, errs=0, coll=0
- port LOCAL: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
- tx pkts=0, bytes=0, drop=0, errs=0, coll=0
duration=?s
])
OVS_VSWITCHD_STOP
duration=?s
])
OVS_VSWITCHD_STOP
Remote Session State: down
])
# bond/show should show 'may-enable: false' for p0.
Remote Session State: down
])
# bond/show should show 'may-enable: false' for p0.
-AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
+AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
may_enable: false
may_enable: true
may_enable: false
may_enable: true
- may_enable: true
- may_enable: true
])
# now enable the bfd on p1 and disable bfd on p0.
])
# now enable the bfd on p1 and disable bfd on p0.