forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These tests prevent regressions against the problems fixed by the previous two commits. Signed-off-by: Ben Pfaff <[email protected]> Acked-by: Daniele Di Proietto <[email protected]>
- Loading branch information
Showing
4 changed files
with
82 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
AT_BANNER([dpctl]) | ||
|
||
AT_SETUP([dpctl - add-dp del-dp]) | ||
OVS_VSWITCHD_START | ||
AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0]) | ||
AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0], [2], [], | ||
[ovs-vswitchd: add_dp (File exists) | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0]) | ||
AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0], [2], [], | ||
[ovs-vswitchd: opening datapath (No such device) | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
OVS_VSWITCHD_STOP | ||
AT_CLEANUP | ||
|
||
AT_SETUP([dpctl - add-if set-if del-if]) | ||
OVS_VSWITCHD_START([], [], [=override]) | ||
AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0]) | ||
AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl | ||
dummy@br0: | ||
lookups: hit:0 missed:0 lost:0 | ||
flows: 0 | ||
port 0: br0 (internal) | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/add-if dummy@br0 vif1.0,type=tap,port_no=5]) | ||
AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl | ||
dummy@br0: | ||
lookups: hit:0 missed:0 lost:0 | ||
flows: 0 | ||
port 0: br0 (internal) | ||
port 5: vif1.0 (tap) | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/add-if dummy@br0 vif1.0,type=tap], [2], [], | ||
[ovs-vswitchd: adding vif1.0 to dummy@br0 failed (File exists) | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 vif1.0,port_no=5]) | ||
AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 vif1.0,type=system], [2], [], | ||
[ovs-vswitchd: vif1.0: can't change type from tap to system | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 br0,type=tap], [2], [], | ||
[ovs-vswitchd: br0: can't change type from internal to tap | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 vif1.0]) | ||
AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl | ||
dummy@br0: | ||
lookups: hit:0 missed:0 lost:0 | ||
flows: 0 | ||
port 0: br0 (internal) | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 vif1.0], [2], [], | ||
[ovs-vswitchd: no port named vif1.0 | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl | ||
dummy@br0: | ||
lookups: hit:0 missed:0 lost:0 | ||
flows: 0 | ||
port 0: br0 (internal) | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 nonexistent], [2], [], | ||
[ovs-vswitchd: no port named nonexistent | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 br0], [2], [], | ||
[ovs-vswitchd: deleting port br0 from dummy@br0 failed (Invalid argument) | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0]) | ||
AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 br0], [2], [], | ||
[ovs-vswitchd: opening datapath (No such device) | ||
ovs-appctl: ovs-vswitchd: server returned an error | ||
]) | ||
OVS_VSWITCHD_STOP(["/dummy@br0: port_del failed (Invalid argument)/d | ||
/dummy@br0: failed to add vif1.0 as port: File exists/d"]) | ||
AT_CLEANUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters