diff options
author | Thadeu Lima de Souza Cascardo <cascardo@redhat.com> | 2016-07-04 15:19:56 -0300 |
---|---|---|
committer | Jesse Gross <jesse@kernel.org> | 2016-07-06 09:07:42 -0700 |
commit | a5bdd3b20d88b40df605db49e7f510e626a87469 (patch) | |
tree | 10c444c085005acf49593b7ac138bb66787e2959 /tests | |
parent | 914403294be27cabaa08778d78fe2b8c87045ba0 (diff) | |
download | openvswitch-a5bdd3b20d88b40df605db49e7f510e626a87469.tar.gz |
bridge: open_type should be used for netdev_open
ofproto_port_open_type should be used for netdev_open, but not for other tests.
For example, STP/RSTP check for interfaces of internal type, but that check will
fail when the netdev datapath is used.
The same thing goes for setting MAC address of internal Interfaces. That fails
for the netdev datapath because the interface type is set to "tap", but they are
still interfaces of type "internal", just their netdev implementation is
different.
Use a netdev_type for the type that needs to be used for netdev_open and
ofproto_port, while we still keep the type as the normalized configured type in
the database.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Jesse Gross <jesse@kernel.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/automake.mk | 1 | ||||
-rw-r--r-- | tests/netdev-type.at | 24 | ||||
-rw-r--r-- | tests/testsuite.at | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/automake.mk b/tests/automake.mk index 8b24221ae..bdf68286c 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -60,6 +60,7 @@ TESTSUITE_AT = \ tests/ofproto-dpif.at \ tests/bridge.at \ tests/ofproto.at \ + tests/netdev-type.at \ tests/ovsdb.at \ tests/ovsdb-log.at \ tests/ovsdb-types.at \ diff --git a/tests/netdev-type.at b/tests/netdev-type.at new file mode 100644 index 000000000..184031b7e --- /dev/null +++ b/tests/netdev-type.at @@ -0,0 +1,24 @@ +AT_BANNER([netdev-type]) + +dnl Setting MAC address of netdev internal port fails +AT_SETUP([bridge - set MAC address of internal port]) +OVS_VSWITCHD_START + +# Add an internal port and make sure that it shows up in the datapath. +add_of_ports br0 1 +AT_CHECK([ovs-appctl dpif/show], [0], [dnl +dummy@ovs-dummy: hit:0 missed:0 + br0: + br0 65534/100: (dummy) + p1 1/1: (dummy) +]) +# +# Set MAC address of dummy device and check that it has been set +AT_CHECK([ovs-vsctl set Interface p1 type=internal mac=\"aa:55:c0:ff:ee:00\"]) +AT_CHECK([ovs-vsctl get Interface p1 mac_in_use], [0], [dnl +"aa:55:c0:ff:ee:00" +]) + +OVS_APP_EXIT_AND_WAIT([ovs-vswitchd]) +OVS_APP_EXIT_AND_WAIT([ovsdb-server]) +AT_CLEANUP diff --git a/tests/testsuite.at b/tests/testsuite.at index 6b3fb2570..f5f125315 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -60,6 +60,7 @@ m4_include([tests/pmd.at]) m4_include([tests/dpctl.at]) m4_include([tests/ofproto-dpif.at]) m4_include([tests/bridge.at]) +m4_include([tests/netdev-type.at]) m4_include([tests/ovsdb.at]) m4_include([tests/ovs-vsctl.at]) m4_include([tests/ovs-monitor-ipsec.at]) |