]> git.proxmox.com Git - ovs.git/blame - tests/dpctl.at
dpif-netdev: Incremental addition/deletion of PMD threads.
[ovs.git] / tests / dpctl.at
CommitLineData
5acf2e91
BP
1AT_BANNER([dpctl])
2
3AT_SETUP([dpctl - add-dp del-dp])
4OVS_VSWITCHD_START
5AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0])
6AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0], [2], [],
7 [ovs-vswitchd: add_dp (File exists)
8ovs-appctl: ovs-vswitchd: server returned an error
9])
10AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0])
186de419
BP
11AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0], [2], [], [stderr])
12AT_CHECK([sed 's/(.*)/(...)/' stderr], [0], [dnl
13ovs-vswitchd: opening datapath (...)
5acf2e91
BP
14ovs-appctl: ovs-vswitchd: server returned an error
15])
16OVS_VSWITCHD_STOP
17AT_CLEANUP
18
19AT_SETUP([dpctl - add-if set-if del-if])
20OVS_VSWITCHD_START([], [], [=override])
21AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0])
22AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl
23dummy@br0:
24 lookups: hit:0 missed:0 lost:0
25 flows: 0
e98d0cb3 26 port 0: br0 (dummy-internal)
5acf2e91 27])
8cc0bed4 28AT_CHECK([ovs-appctl dpctl/add-if dummy@br0 vif1.0,type=dummy,port_no=5])
5acf2e91
BP
29AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl
30dummy@br0:
31 lookups: hit:0 missed:0 lost:0
32 flows: 0
e98d0cb3 33 port 0: br0 (dummy-internal)
8cc0bed4 34 port 5: vif1.0 (dummy)
5acf2e91 35])
8cc0bed4 36AT_CHECK([ovs-appctl dpctl/add-if dummy@br0 vif1.0,type=dummy], [2], [],
186de419
BP
37 [stderr])
38AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
39 [ovs-vswitchd: adding vif1.0 to dummy@br0 failed (...)
5acf2e91
BP
40ovs-appctl: ovs-vswitchd: server returned an error
41])
42AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 vif1.0,port_no=5])
43AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 vif1.0,type=system], [2], [],
8cc0bed4 44 [ovs-vswitchd: vif1.0: can't change type from dummy to system
5acf2e91
BP
45ovs-appctl: ovs-vswitchd: server returned an error
46])
e98d0cb3 47AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 br0,type=dummy-internal], [0])
a3e8437a 48AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 br0,type=internal], [2], [],
e98d0cb3 49 [ovs-vswitchd: br0: can't change type from dummy-internal to internal
5acf2e91
BP
50ovs-appctl: ovs-vswitchd: server returned an error
51])
52AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 vif1.0])
53AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl
54dummy@br0:
55 lookups: hit:0 missed:0 lost:0
56 flows: 0
e98d0cb3 57 port 0: br0 (dummy-internal)
5acf2e91
BP
58])
59AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 vif1.0], [2], [],
60 [ovs-vswitchd: no port named vif1.0
61ovs-appctl: ovs-vswitchd: server returned an error
62])
63AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl
64dummy@br0:
65 lookups: hit:0 missed:0 lost:0
66 flows: 0
e98d0cb3 67 port 0: br0 (dummy-internal)
5acf2e91
BP
68])
69AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 nonexistent], [2], [],
70 [ovs-vswitchd: no port named nonexistent
71ovs-appctl: ovs-vswitchd: server returned an error
72])
186de419
BP
73AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 br0], [2], [], [stderr])
74AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
75 [ovs-vswitchd: deleting port br0 from dummy@br0 failed (...)
5acf2e91
BP
76ovs-appctl: ovs-vswitchd: server returned an error
77])
78AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0])
186de419
BP
79AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 br0], [2], [], [stderr])
80AT_CHECK([sed 's/(.*)/(...)/' stderr], [0],
81 [ovs-vswitchd: opening datapath (...)
5acf2e91
BP
82ovs-appctl: ovs-vswitchd: server returned an error
83])
186de419 84OVS_VSWITCHD_STOP(["/dummy@br0: port_del failed/d
096d7135
PB
85/dummy@br0: failed to add vif1.0 as port/d
86/Dropped 1 log messages in last/d"])
5acf2e91 87AT_CLEANUP