dpif-netlink: add GENEVE creation support
[cascardo/ovs.git] / tests / interface-reconfigure.at
index 3658882..b4e455d 100644 (file)
@@ -696,6 +696,8 @@ AT_BANNER([interface-reconfigure])
 
 AT_SETUP([non-VLAN, non-bond])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 AT_CHECK([ifr_run --force xenbr2 up], [0], [], [stderr])
@@ -706,10 +708,10 @@ action_up: xenbr2
 Writing network configuration for xenbr2
 Configuring xenbr2 using DHCP configuration
 configure_datapath: bridge      - xenbr2
-configure_datapath: physical    - [u'eth2']
+configure_datapath: physical    - ['eth2']
 configure_datapath: extra ports - []
 configure_datapath: extra bonds - []
-/usr/bin/ovs-vsctl --timeout=5 -vANY:console:off get-fail-mode xenbr2
+/usr/bin/ovs-vsctl -vconsole:off get-fail-mode xenbr2
 Applying changes to /etc/sysconfig/network-scripts/route-xenbr2 configuration
 Applying changes to /etc/sysconfig/network configuration
 Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
@@ -724,7 +726,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
     set Bridge xenbr2 fail_mode=secure
     remove Bridge xenbr2 other_config disable-in-band
     br-set-external-id xenbr2 xs-network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
-/usr/bin/ovs-vsctl --timeout=5 -vANY:console:off get interface eth2 ofport
+/usr/bin/ovs-vsctl -vconsole:off get interface eth2 ofport
 /usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,arp,nw_proto=1,actions=local
 /usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=local,arp,dl_src=00:15:17:a0:29:80,actions=5
 /usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,dl_dst=00:15:17:a0:29:80,actions=local
@@ -760,7 +762,7 @@ action_down: xenbr2
 /sbin/ifdown xenbr2
 deconfigure ipdev xenbr2 on xenbr2
 deconfigure_bridge: bridge           - xenbr2
-action_down: bring down physical devices - [u'eth2']
+action_down: bring down physical devices - ['eth2']
 /sbin/ifconfig eth2 down
 /usr/bin/ovs-vsctl --timeout=20
     --with-iface --if-exists del-port xenbr2
@@ -771,6 +773,8 @@ AT_CLEANUP
 \f
 AT_SETUP([VLAN, non-bond])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 AT_CHECK([ifr_run --force xapi3 up], [0], [], [stderr])
@@ -781,7 +785,7 @@ action_up: xapi3
 Writing network configuration for xapi3
 Configuring xapi3 using None configuration
 configure_datapath: bridge      - xenbr3
-configure_datapath: physical    - [u'eth3']
+configure_datapath: physical    - ['eth3']
 configure_datapath: extra ports - []
 configure_datapath: extra bonds - []
 Applying changes to /etc/sysconfig/network-scripts/route-xapi3 configuration
@@ -832,7 +836,7 @@ deconfigure ipdev xapi3 on xenbr3
 deconfigure_bridge: bridge           - xapi3
 action_down: no more masters, bring down slave xenbr3
 deconfigure_bridge: bridge           - xenbr3
-action_down: bring down physical devices - [u'eth3']
+action_down: bring down physical devices - ['eth3']
 /sbin/ifconfig eth3 down
 /usr/bin/ovs-vsctl --timeout=20
     --with-iface --if-exists del-port xapi3
@@ -844,6 +848,8 @@ AT_CLEANUP
 \f
 AT_SETUP([Bond, non-VLAN])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 # Pretend that bond0 exists, even though it would really be created by
@@ -863,7 +869,7 @@ Configuring xapi1 using None configuration
 configure_datapath: leaving bond bond0 up
 configure_datapath: leaving bond bond0 up
 configure_datapath: bridge      - xapi1
-configure_datapath: physical    - [u'eth0', u'eth1']
+configure_datapath: physical    - ['eth0', 'eth1']
 configure_datapath: extra ports - []
 configure_datapath: extra bonds - []
 netdev: down: device xenbr0 does not exist, ignoring
@@ -884,7 +890,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi1 configuration
     --may-exist add-br xapi1
     --with-iface --if-exists del-port bond0
     --fake-iface add-bond xapi1 bond0 eth0 eth1
-    set Port bond0 MAC="00:22:19:22:4b:af" other-config:bond-miimon-interval=100 bond_downdelay=200 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
+    set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
     set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
     set Bridge xapi1 fail_mode=secure
     remove Bridge xapi1 other_config disable-in-band
@@ -920,7 +926,7 @@ action_down: xapi1
 /sbin/ifdown xapi1
 deconfigure ipdev xapi1 on xapi1
 deconfigure_bridge: bridge           - xapi1
-action_down: bring down physical devices - [u'eth0', u'eth1']
+action_down: bring down physical devices - ['eth0', 'eth1']
 /sbin/ifconfig eth0 down
 /sbin/ifconfig eth1 down
 /usr/bin/ovs-vsctl --timeout=20
@@ -932,6 +938,8 @@ AT_CLEANUP
 \f
 AT_SETUP([VLAN on bond])
 AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
 ifr_setup
 
 # Pretend that bond0 exists, even though it would really be created by
@@ -951,7 +959,7 @@ Configuring xapi2 using None configuration
 configure_datapath: leaving bond bond0 up
 configure_datapath: leaving bond bond0 up
 configure_datapath: bridge      - xapi1
-configure_datapath: physical    - [u'eth0', u'eth1']
+configure_datapath: physical    - ['eth0', 'eth1']
 configure_datapath: extra ports - []
 configure_datapath: extra bonds - []
 netdev: down: device xenbr0 does not exist, ignoring
@@ -972,7 +980,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi2 configuration
     --may-exist add-br xapi1
     --with-iface --if-exists del-port bond0
     --fake-iface add-bond xapi1 bond0 eth0 eth1
-    set Port bond0 MAC="00:22:19:22:4b:af" other-config:bond-miimon-interval=100 bond_downdelay=200 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
+    set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
     set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
     set Bridge xapi1 fail_mode=secure
     remove Bridge xapi1 other_config disable-in-band
@@ -1014,7 +1022,7 @@ deconfigure ipdev xapi2 on xapi1
 deconfigure_bridge: bridge           - xapi2
 action_down: no more masters, bring down slave xapi1
 deconfigure_bridge: bridge           - xapi1
-action_down: bring down physical devices - [u'eth0', u'eth1']
+action_down: bring down physical devices - ['eth0', 'eth1']
 /sbin/ifconfig eth0 down
 /sbin/ifconfig eth1 down
 /usr/bin/ovs-vsctl --timeout=20
@@ -1024,3 +1032,22 @@ action_down: bring down physical devices - [u'eth0', u'eth1']
 ]])
 
 AT_CLEANUP
+
+dnl This test configures two tunnels, then deletes the second and re-uses its
+dnl name for different types of ports. This was introduced to detect errors
+dnl where port configuration persists even when the port is deleted and
+dnl readded.
+AT_SETUP([Re-create port with different types])
+AT_KEYWORDS([interface-reconfigure])
+OVS_VSWITCHD_START(
+  [add-port br0 p0 -- set int p0 type=gre options:remote_ip=127.0.0.1 -- \
+   add-port br0 p1 -- set int p1 type=dummy -- \
+   add-port br0 p2 -- set int p2 type=dummy])
+
+AT_CHECK([ovs-vsctl set int p1 type=gre options:remote_ip=127.0.0.1])
+AT_CHECK([ovs-vsctl del-port p1])
+AT_CHECK([ovs-vsctl add-port br0 p1 -- set int p1 type=dummy])
+
+OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
+OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+AT_CLEANUP