]> git.proxmox.com Git - mirror_ovs.git/blob - tests/system-interface.at
tests: Log commands being executed for async message control test.
[mirror_ovs.git] / tests / system-interface.at
1 AT_BANNER([system-inteface])
2
3 dnl add a veth interface to br0, then delete and re-create
4 dnl the veth interface with the same name in the system
5 AT_SETUP([interface - add delete add same interface])
6
7 OVS_TRAFFIC_VSWITCHD_START()
8
9 AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1])
10 on_exit 'ip link del ovs-veth0'
11
12 AT_CHECK([ovs-vsctl add-port br0 ovs-veth0])
13
14 AT_CHECK([ip link del ovs-veth0])
15 AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1])
16
17 AT_CHECK([ovs-vsctl del-port br0 ovs-veth0])
18
19 OVS_TRAFFIC_VSWITCHD_STOP(["dnl
20 /could not open network device ovs-veth0/d
21 /cannot get .*STP status on nonexistent port/d
22 /ethtool command .*on network device ovs-veth0 failed/d
23 /error receiving .*ovs-veth0/d
24 /ovs-veth0: removing policing failed/d"])
25
26 AT_CLEANUP
27
28 dnl add a p1-0 interface to br-p1, then add a route to br-p1 and stop the OvS
29 dnl instance. Confirm br-p1 interface has been deleted from the system.
30 AT_SETUP([interface - add route to br and verify clean-up])
31
32 OVS_TRAFFIC_VSWITCHD_START()
33
34 HWADDR_BRP1=aa:55:00:00:00:01
35
36 dnl Create tap port to later add to br-p1
37 AT_CHECK([ip tuntap add name p1-0 mode tap])
38 AT_CHECK([ip link set p1-0 up])
39 on_exit 'ip link del p1-0'
40
41 AT_CHECK([
42 ovs-vsctl add-br br-p1 -- \
43 set bridge br-p1 datapath_type=netdev fail-mode=standalone other-config:hwaddr=$HWADDR_BRP1
44
45 ovs-vsctl add-port br-p1 p1-0
46
47 ovs-ofctl del-flows br-p1
48 ], [0])
49
50 AT_CHECK([
51 ip addr add 10.0.0.1/24 dev br-p1
52 ip link set br-p1 up
53 ], [0], [stdout])
54
55 AT_CHECK([
56 ovs-appctl ovs/route/add 10.0.0.0/24 br-p1
57 ovs-appctl tnl/arp/set br-p1 10.0.0.1 $HWADDR_BRP1
58 ], [0], [stdout])
59
60 OVS_TRAFFIC_VSWITCHD_STOP
61 AT_CHECK([
62 ip link show br-p1], [1],
63 [stdout], [Device "br-p1" does not exist.]
64 )
65 AT_CLEANUP