File: bridge.at

package info (click to toggle)
openvswitch 2.6.2~pre%2Bgit20161223-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 42,772 kB
  • ctags: 37,668
  • sloc: sh: 499,654; ansic: 261,360; xml: 21,326; python: 14,843; makefile: 450; perl: 409
file content (40 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
AT_BANNER([bridge])

dnl When a port disappears from a datapath, e.g. because an admin used
dnl "ovs-dpctl del-port", the bridge code should be resilient enough to
dnl notice and add it back the next time we reconfigure.  A prior version
dnl of the code failed to do this, so this test guards against regression.
AT_SETUP([bridge - ports that disappear get added back])
OVS_VSWITCHD_START

# Add some ports and make sure that they show up in the datapath.
add_of_ports br0 1 2
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
	br0:
		br0 65534/100: (dummy-internal)
		p1 1/1: (dummy)
		p2 2/2: (dummy)
])

# Delete p1 from the datapath with "ovs-dpctl del-if"
# and check that it disappeared.
AT_CHECK([ovs-appctl dpctl/del-if dummy@ovs-dummy p1])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
	br0:
		br0 65534/100: (dummy-internal)
		p2 2/2: (dummy)
])

# Force reconfiguration and make sure that p1 got added back.
AT_CHECK([ovs-vsctl del-port p2])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
	br0:
		br0 65534/100: (dummy-internal)
		p1 1/1: (dummy)
])
OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
OVS_APP_EXIT_AND_WAIT([ovsdb-server])
AT_CLEANUP