Re: [ovs-dev] [PATCH v2] tests: add-del-add sequence for interface
On Thu, Jan 11, 2018 at 03:32:18AM +0800, Yi-Hung Wei wrote: > On Fri, Jan 5, 2018 at 7:30 AM, Ben Pfaffwrote: > > Yi-Hung, are you planning to review this version/ > > > > On Fri, Dec 15, 2017 at 07:09:50AM -0800, Ashish Varma wrote: > >> Added a unit test case for testing the condition when a veth interface > >> is added to br0 and then the veth interface is deleted from the > >> system and added back with the same name. > >> > >> Signed-off-by: Ashish Varma > > This patch looks good to me. I tested it on Ubuntu 16.04. > > Acked-by: Yi-Hung Wei Thanks, I applied this to master. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v2] tests: add-del-add sequence for interface
On Fri, Jan 5, 2018 at 7:30 AM, Ben Pfaffwrote: > Yi-Hung, are you planning to review this version/ > > On Fri, Dec 15, 2017 at 07:09:50AM -0800, Ashish Varma wrote: >> Added a unit test case for testing the condition when a veth interface >> is added to br0 and then the veth interface is deleted from the >> system and added back with the same name. >> >> Signed-off-by: Ashish Varma This patch looks good to me. I tested it on Ubuntu 16.04. Acked-by: Yi-Hung Wei ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v2] tests: add-del-add sequence for interface
Yi-Hung, are you planning to review this version/ On Fri, Dec 15, 2017 at 07:09:50AM -0800, Ashish Varma wrote: > Added a unit test case for testing the condition when a veth interface > is added to br0 and then the veth interface is deleted from the > system and added back with the same name. > > Signed-off-by: Ashish Varma> --- > v1-v2 > Incorporated the comments by Yi-Hung Wei: > Added system-interface.at test to system-userspace-testsuite. > Replaced space by tab in automake.mk. > Added handling for conditions when the veth interface is not detected > (as expected) by vswitchd, which caused test case failure. > (This was happening intermittently) > --- > tests/automake.mk | 3 ++- > tests/system-interface.at | 27 +++ > tests/system-kmod-testsuite.at | 1 + > tests/system-userspace-testsuite.at | 1 + > 4 files changed, 31 insertions(+), 1 deletion(-) > create mode 100644 tests/system-interface.at > > diff --git a/tests/automake.mk b/tests/automake.mk > index c1a2357..5af03d6 100644 > --- a/tests/automake.mk > +++ b/tests/automake.mk > @@ -119,7 +119,8 @@ SYSTEM_TESTSUITE_AT = \ > tests/system-common-macros.at \ > tests/system-ovn.at \ > tests/system-layer3-tunnels.at \ > - tests/system-traffic.at > + tests/system-traffic.at \ > + tests/system-interface.at > > SYSTEM_OFFLOADS_TESTSUITE_AT = \ > tests/system-common-macros.at \ > diff --git a/tests/system-interface.at b/tests/system-interface.at > new file mode 100644 > index 000..db790d5 > --- /dev/null > +++ b/tests/system-interface.at > @@ -0,0 +1,27 @@ > +AT_BANNER([system-inteface]) > + > +dnl add a veth interface to br0, then delete and re-create > +dnl the veth interface with the same name in the system > +AT_SETUP([interface - add delete add same interface]) > + > +OVS_TRAFFIC_VSWITCHD_START() > + > +AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1]) > +on_exit 'ip link del ovs-veth0' > + > +AT_CHECK([ovs-vsctl add-port br0 ovs-veth0]) > + > +AT_CHECK([ip link del ovs-veth0]) > +AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1]) > + > +AT_CHECK([ovs-vsctl del-port br0 ovs-veth0]) > + > +OVS_TRAFFIC_VSWITCHD_STOP(["dnl > +/could not open network device ovs-veth0/d > +/cannot get .*STP status on nonexistent port/d > +/ethtool command .*on network device ovs-veth0 failed/d > +/error receiving .*ovs-veth0/d > +/ovs-veth0: removing policing failed/d"]) > + > +AT_CLEANUP > + > diff --git a/tests/system-kmod-testsuite.at b/tests/system-kmod-testsuite.at > index 975b200..bda314a 100644 > --- a/tests/system-kmod-testsuite.at > +++ b/tests/system-kmod-testsuite.at > @@ -25,3 +25,4 @@ m4_include([tests/system-kmod-macros.at]) > m4_include([tests/system-traffic.at]) > m4_include([tests/system-layer3-tunnels.at]) > m4_include([tests/system-ovn.at]) > +m4_include([tests/system-interface.at]) > diff --git a/tests/system-userspace-testsuite.at > b/tests/system-userspace-testsuite.at > index a89536f..c0aaa60 100644 > --- a/tests/system-userspace-testsuite.at > +++ b/tests/system-userspace-testsuite.at > @@ -25,4 +25,5 @@ m4_include([tests/system-common-macros.at]) > m4_include([tests/system-traffic.at]) > m4_include([tests/system-layer3-tunnels.at]) > m4_include([tests/system-ovn.at]) > +m4_include([tests/system-interface.at]) > m4_include([tests/system-userspace-packet-type-aware.at]) > -- > 2.7.4 > > ___ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH v2] tests: add-del-add sequence for interface
Added a unit test case for testing the condition when a veth interface is added to br0 and then the veth interface is deleted from the system and added back with the same name. Signed-off-by: Ashish Varma--- v1-v2 Incorporated the comments by Yi-Hung Wei: Added system-interface.at test to system-userspace-testsuite. Replaced space by tab in automake.mk. Added handling for conditions when the veth interface is not detected (as expected) by vswitchd, which caused test case failure. (This was happening intermittently) --- tests/automake.mk | 3 ++- tests/system-interface.at | 27 +++ tests/system-kmod-testsuite.at | 1 + tests/system-userspace-testsuite.at | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 tests/system-interface.at diff --git a/tests/automake.mk b/tests/automake.mk index c1a2357..5af03d6 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -119,7 +119,8 @@ SYSTEM_TESTSUITE_AT = \ tests/system-common-macros.at \ tests/system-ovn.at \ tests/system-layer3-tunnels.at \ - tests/system-traffic.at + tests/system-traffic.at \ + tests/system-interface.at SYSTEM_OFFLOADS_TESTSUITE_AT = \ tests/system-common-macros.at \ diff --git a/tests/system-interface.at b/tests/system-interface.at new file mode 100644 index 000..db790d5 --- /dev/null +++ b/tests/system-interface.at @@ -0,0 +1,27 @@ +AT_BANNER([system-inteface]) + +dnl add a veth interface to br0, then delete and re-create +dnl the veth interface with the same name in the system +AT_SETUP([interface - add delete add same interface]) + +OVS_TRAFFIC_VSWITCHD_START() + +AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1]) +on_exit 'ip link del ovs-veth0' + +AT_CHECK([ovs-vsctl add-port br0 ovs-veth0]) + +AT_CHECK([ip link del ovs-veth0]) +AT_CHECK([ip link add ovs-veth0 type veth peer name ovs-veth1]) + +AT_CHECK([ovs-vsctl del-port br0 ovs-veth0]) + +OVS_TRAFFIC_VSWITCHD_STOP(["dnl +/could not open network device ovs-veth0/d +/cannot get .*STP status on nonexistent port/d +/ethtool command .*on network device ovs-veth0 failed/d +/error receiving .*ovs-veth0/d +/ovs-veth0: removing policing failed/d"]) + +AT_CLEANUP + diff --git a/tests/system-kmod-testsuite.at b/tests/system-kmod-testsuite.at index 975b200..bda314a 100644 --- a/tests/system-kmod-testsuite.at +++ b/tests/system-kmod-testsuite.at @@ -25,3 +25,4 @@ m4_include([tests/system-kmod-macros.at]) m4_include([tests/system-traffic.at]) m4_include([tests/system-layer3-tunnels.at]) m4_include([tests/system-ovn.at]) +m4_include([tests/system-interface.at]) diff --git a/tests/system-userspace-testsuite.at b/tests/system-userspace-testsuite.at index a89536f..c0aaa60 100644 --- a/tests/system-userspace-testsuite.at +++ b/tests/system-userspace-testsuite.at @@ -25,4 +25,5 @@ m4_include([tests/system-common-macros.at]) m4_include([tests/system-traffic.at]) m4_include([tests/system-layer3-tunnels.at]) m4_include([tests/system-ovn.at]) +m4_include([tests/system-interface.at]) m4_include([tests/system-userspace-packet-type-aware.at]) -- 2.7.4 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev