]>
Commit | Line | Data |
---|---|---|
9a25910a TL |
1 | Description: Another test that's failing in MIPS |
2 | Author: Thomas Goirand <zigo@debian.org> | |
3 | Forwarded: no | |
4 | Last-Update: 2018-10-25 | |
5 | ||
6 | Index: openvswitch/tests/ovn.at | |
7 | =================================================================== | |
8 | --- openvswitch.orig/tests/ovn.at | |
9 | +++ openvswitch/tests/ovn.at | |
10 | @@ -2047,208 +2047,6 @@ OVN_CLEANUP([hv1],[hv2]) | |
11 | ||
12 | AT_CLEANUP | |
13 | ||
14 | -AT_SETUP([ovn -- vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS]) | |
15 | -AT_KEYWORDS([vtep]) | |
16 | -AT_SKIP_IF([test $HAVE_PYTHON = no]) | |
17 | -ovn_start | |
18 | - | |
19 | -# Configure the Northbound database | |
20 | -ovn-nbctl ls-add lsw0 | |
21 | - | |
22 | -ovn-nbctl lsp-add lsw0 lp1 | |
23 | -ovn-nbctl lsp-set-addresses lp1 f0:00:00:00:00:01 | |
24 | - | |
25 | -ovn-nbctl lsp-add lsw0 lp2 | |
26 | -ovn-nbctl lsp-set-addresses lp2 f0:00:00:00:00:02 | |
27 | - | |
28 | -ovn-nbctl lsp-add lsw0 lp-vtep | |
29 | -ovn-nbctl lsp-set-type lp-vtep vtep | |
30 | -ovn-nbctl lsp-set-options lp-vtep vtep-physical-switch=br-vtep vtep-logical-switch=lsw0 | |
31 | -ovn-nbctl lsp-set-addresses lp-vtep unknown | |
32 | - | |
33 | -# lpr, lr and lrp1 are used for the ARP request handling test only. | |
34 | -ovn-nbctl lsp-add lsw0 lpr | |
35 | -ovn-nbctl lr-add lr | |
36 | -ovn-nbctl lrp-add lr lrp1 f0:00:00:00:00:f1 192.168.1.1/24 | |
37 | -ovn-nbctl set Logical_Switch_Port lpr type=router \ | |
38 | - options:router-port=lrp1 \ | |
39 | - addresses='"f0:00:00:00:00:f1 192.168.1.1"' | |
40 | - | |
41 | - | |
42 | -net_add n1 # Network to connect hv1, hv2, and vtep | |
43 | -net_add n2 # Network to connect vtep and hv3 | |
44 | - | |
45 | -# Create hypervisor hv1 connected to n1 | |
46 | -sim_add hv1 | |
47 | -as hv1 | |
48 | -ovs-vsctl add-br br-phys | |
49 | -ovn_attach n1 br-phys 192.168.0.1 | |
50 | -ovs-vsctl add-port br-int vif1 -- set Interface vif1 external-ids:iface-id=lp1 options:tx_pcap=hv1/vif1-tx.pcap options:rxq_pcap=hv1/vif1-rx.pcap ofport-request=1 | |
51 | - | |
52 | -# Create hypervisor hv2 connected to n1 | |
53 | -sim_add hv2 | |
54 | -as hv2 | |
55 | -ovs-vsctl add-br br-phys | |
56 | -ovn_attach n1 br-phys 192.168.0.2 | |
57 | -ovs-vsctl add-port br-int vif2 -- set Interface vif2 external-ids:iface-id=lp2 options:tx_pcap=hv2/vif2-tx.pcap options:rxq_pcap=hv2/vif2-rx.pcap ofport-request=1 | |
58 | - | |
59 | - | |
60 | -# Start the vtep emulator with a leg in both networks | |
61 | -sim_add vtep | |
62 | -as vtep | |
63 | - | |
64 | -ovsdb-tool create "$ovs_base"/vtep/vtep.db "$abs_top_srcdir"/vtep/vtep.ovsschema || return 1 | |
65 | -ovs-appctl -t ovsdb-server ovsdb-server/add-db "$ovs_base"/vtep/vtep.db | |
66 | - | |
67 | -ovs-vsctl add-br br-phys | |
68 | -net_attach n1 br-phys | |
69 | - | |
70 | -mac=`ovs-vsctl get Interface br-phys mac_in_use | sed s/\"//g` | |
71 | -arp_table="$arp_table $sandbox,br-phys,192.168.0.3,$mac" | |
72 | -ovs-appctl netdev-dummy/ip4addr br-phys 192.168.0.3/24 >/dev/null || return 1 | |
73 | -ovs-appctl ovs/route/add 192.168.0.3/24 br-phys >/dev/null || return 1 | |
74 | - | |
75 | -ovs-vsctl add-br br-vtep | |
76 | -net_attach n2 br-vtep | |
77 | - | |
78 | -vtep-ctl add-ps br-vtep | |
79 | -vtep-ctl set Physical_Switch br-vtep tunnel_ips=192.168.0.3 | |
80 | -vtep-ctl add-ls lsw0 | |
81 | - | |
82 | -start_daemon ovs-vtep br-vtep | |
83 | -start_daemon ovn-controller-vtep --vtep-db=unix:"$ovs_base"/vtep/db.sock --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock | |
84 | - | |
85 | -OVS_WAIT_UNTIL([vtep-ctl bind-ls br-vtep br-vtep_n2 0 lsw0]) | |
86 | - | |
87 | -OVS_WAIT_UNTIL([test -n "`as vtep vtep-ctl get-replication-mode lsw0 | | |
88 | - grep -- source`"]) | |
89 | -# It takes more time for the update to be processed by ovs-vtep. | |
90 | -sleep 1 | |
91 | - | |
92 | -# Add hv3 on the other side of the vtep | |
93 | -sim_add hv3 | |
94 | -as hv3 | |
95 | -ovs-vsctl add-br br-phys | |
96 | -net_attach n2 br-phys | |
97 | - | |
98 | -ovs-vsctl add-port br-phys vif3 -- set Interface vif3 options:tx_pcap=hv3/vif3-tx.pcap options:rxq_pcap=hv3/vif3-rx.pcap ofport-request=1 | |
99 | - | |
100 | -# Pre-populate the hypervisors' ARP tables so that we don't lose any | |
101 | -# packets for ARP resolution (native tunneling doesn't queue packets | |
102 | -# for ARP resolution). | |
103 | -OVN_POPULATE_ARP | |
104 | - | |
105 | -# Allow some time for ovn-northd and ovn-controller to catch up. | |
106 | -# XXX This should be more systematic. | |
107 | -sleep 1 | |
108 | - | |
109 | -# test_packet INPORT DST SRC ETHTYPE OUTPORT... | |
110 | -# | |
111 | -# This shell function causes a packet to be received on INPORT. The packet's | |
112 | -# content has Ethernet destination DST and source SRC (each exactly 12 hex | |
113 | -# digits) and Ethernet type ETHTYPE (4 hex digits). The OUTPORTs (zero or | |
114 | -# more) list the VIFs on which the packet should be received. INPORT and the | |
115 | -# OUTPORTs are specified as logical switch port numbers, e.g. 1 for vif1. | |
116 | -for i in 1 2 3; do | |
117 | - : > $i.expected | |
118 | -done | |
119 | -test_packet() { | |
120 | - local inport=$1 packet=$2$3$4; shift; shift; shift; shift | |
121 | - #hv=hv`echo $inport | sed 's/^\(.\).*/\1/'` | |
122 | - hv=hv$inport | |
123 | - vif=vif$inport | |
124 | - as $hv ovs-appctl netdev-dummy/receive $vif $packet | |
125 | - for outport; do | |
126 | - echo $packet >> $outport.expected | |
127 | - done | |
128 | -} | |
129 | - | |
130 | -# Send packets between all pairs of source and destination ports: | |
131 | -# | |
132 | -# 1. Unicast packets are delivered to exactly one logical switch port | |
133 | -# (except that packets destined to their input ports are dropped). | |
134 | -# | |
135 | -# 2. Broadcast and multicast are delivered to all logical switch ports | |
136 | -# except the input port. | |
137 | -# | |
138 | -# 3. The switch delivers packets with an unknown destination to logical | |
139 | -# switch ports with "unknown" among their MAC addresses (and port | |
140 | -# security disabled). | |
141 | -for s in 1 2 3; do | |
142 | - bcast= | |
143 | - unknown= | |
144 | - for d in 1 2 3; do | |
145 | - if test $d != $s; then unicast=$d; else unicast=; fi | |
146 | - test_packet $s f0000000000$d f0000000000$s 00$s$d $unicast #1 | |
147 | - | |
148 | - # The vtep (vif3) is the only one configured for "unknown" | |
149 | - if test $d != $s && test $d = 3; then | |
150 | - unknown="$unknown $d" | |
151 | - fi | |
152 | - bcast="$bcast $unicast" | |
153 | - done | |
154 | - | |
155 | - # Broadcast and multicast. | |
156 | - test_packet $s ffffffffffff f0000000000$s 0${s}ff $bcast #2 | |
157 | - test_packet $s 010000000000 f0000000000$s 0${s}ff $bcast #2 | |
158 | - | |
159 | - test_packet $s f0000000ffff f0000000000$s 0${s}66 $unknown #3 | |
160 | -done | |
161 | - | |
162 | -# ARP request should not be responded to by logical switch router | |
163 | -# type arp responder on HV1 and HV2 and should reach directly to | |
164 | -# vif1 and vif2 | |
165 | -ip_to_hex() { | |
166 | - printf "%02x%02x%02x%02x" "$@" | |
167 | -} | |
168 | -sha=f00000000003 | |
169 | -spa=`ip_to_hex 192 168 1 2` | |
170 | -tpa=`ip_to_hex 192 168 1 1` | |
171 | -request=ffffffffffff${sha}08060001080006040001${sha}${spa}ffffffffffff${tpa} | |
172 | -as hv3 ovs-appctl netdev-dummy/receive vif3 $request | |
173 | -echo $request >> 1.expected | |
174 | -echo $request >> 2.expected | |
175 | - | |
176 | -# dump information with counters | |
177 | -echo "------ OVN dump ------" | |
178 | -ovn-nbctl show | |
179 | -ovn-sbctl show | |
180 | - | |
181 | -echo "---------SB dump-----" | |
182 | -ovn-sbctl list datapath_binding | |
183 | -echo "---------------------" | |
184 | -ovn-sbctl list port_binding | |
185 | -echo "---------------------" | |
186 | -ovn-sbctl dump-flows | |
187 | - | |
188 | -echo "------ hv1 dump ------" | |
189 | -as hv1 ovs-vsctl show | |
190 | -as hv1 ovs-ofctl -O OpenFlow13 show br-int | |
191 | -as hv1 ovs-ofctl -O OpenFlow13 dump-flows br-int | |
192 | - | |
193 | -echo "------ hv2 dump ------" | |
194 | -as hv2 ovs-vsctl show | |
195 | -as hv2 ovs-ofctl -O OpenFlow13 show br-int | |
196 | -as hv2 ovs-ofctl -O OpenFlow13 dump-flows br-int | |
197 | - | |
198 | -echo "------ hv3 dump ------" | |
199 | -as hv3 ovs-vsctl show | |
200 | -# note: hv3 has no logical port bind, thus it should not have br-int | |
201 | -AT_CHECK([as hv3 ovs-ofctl -O OpenFlow13 show br-int], [1], [], | |
202 | -[ovs-ofctl: br-int is not a bridge or a socket | |
203 | -]) | |
204 | - | |
205 | -# Now check the packets actually received against the ones expected. | |
206 | -for i in 1 2 3; do | |
207 | - OVN_CHECK_PACKETS([hv$i/vif$i-tx.pcap], [$i.expected]) | |
208 | -done | |
209 | - | |
210 | -# Gracefully terminate daemons | |
211 | -OVN_CLEANUP([hv1],[hv2],[vtep]) | |
212 | -OVN_CLEANUP_VSWITCH([hv3]) | |
213 | - | |
214 | -AT_CLEANUP | |
215 | - | |
216 | # Similar test to "hardware GW" | |
217 | AT_SETUP([ovn -- 3 HVs, 1 VIFs/HV, 1 software GW, 1 LS]) | |
218 | AT_SKIP_IF([test $HAVE_PYTHON = no]) |