2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Files
openvswitch/tests/bridge.at
Ben Pfaff c40b890fd8 bridge: Add test that ports that disappear get added back to the datapath.
The test added in this commit would have caught the bug fixed by commit
96be8de595 (bridge: When ports disappear from a datapath, add them
back.).  With that commit reverted, the new test fails.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
2014-05-22 14:25:50 -07:00

39 lines
1.1 KiB
Plaintext

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)
p1 1/1: (dummy)
p2 2/2: (dummy)
])
# Delete p1 from the datapath as if by "ovs-dpctl del-port"
# and check that it disappeared.
AT_CHECK([ovs-appctl dpif-dummy/delete-port ovs-dummy p1])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
br0:
br0 65534/100: (dummy)
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)
p1 1/1: (dummy)
])
AT_CLEANUP