Skip to content

[vs test bug fix] Restore eth0 up in post-test clean up#1452

Merged
prsunny merged 1 commit intosonic-net:masterfrom
wendani:test_fix
Sep 30, 2020
Merged

[vs test bug fix] Restore eth0 up in post-test clean up#1452
prsunny merged 1 commit intosonic-net:masterfrom
wendani:test_fix

Conversation

@wendani
Copy link
Contributor

@wendani wendani commented Sep 29, 2020

As per #1030 (comment)

Signed-off-by: Wenda Ni wonda.ni@gmail.com

What I did

Why I did it
test_port.py test failure if follows test_portchannel.py using persistent vs container

$ sudo pytest -v --dvsname=vs -s test_portchannel.py 
================================================================ test session starts =================================================================
platform linux2 -- Python 2.7.13, pytest-4.6.9, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python2
cachedir: .pytest_cache
rootdir: /home/wendani/sonic-buildimage-201911/src/sonic-swss/tests
plugins: flaky-3.7.0
collected 2 items                                                                                                                                    

test_portchannel.py::TestPortchannel::test_Portchannel remove extra link dummy
PASSED
test_portchannel.py::TestPortchannel::test_Portchannel_oper_down PASSED

$ sudo ip netns exec sw-srv0 ip -d link show eth0
1408: eth0@if1407: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether e2:62:28:06:a9:84 brd ff:ff:ff:ff:ff:ff link-netnsid 1 promiscuity 0 
    veth addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 

$ sudo pytest -v --dvsname=vs -s test_port.py
================================================================ test session starts =================================================================
platform linux2 -- Python 2.7.13, pytest-4.6.9, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python2
cachedir: .pytest_cache
rootdir: /home/wendani/sonic-buildimage-201911/src/sonic-swss/tests
plugins: flaky-3.7.0
collected 6 items                                                                                                                                    

test_port.py::TestPort::test_PortMtu remove extra link dummy
PASSED
test_port.py::TestPort::test_PortNotification FAILED
test_port.py::TestPort::test_PortFec FAILED
test_port.py::TestPort::test_PortPreemp PASSED
test_port.py::TestPort::test_PortIdriver PASSED
test_port.py::TestPort::test_PortIpredriver PASSED

How I verified it
201911 branch

$ sudo pytest -v --dvsname=vs -s test_portchannel.py 
================================================================ test session starts =================================================================
platform linux2 -- Python 2.7.13, pytest-4.6.9, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python2
cachedir: .pytest_cache
rootdir: /home/wendani/sonic-buildimage-201911/src/sonic-swss/tests
plugins: flaky-3.7.0
collected 2 items                                                                                                                                    

test_portchannel.py::TestPortchannel::test_Portchannel remove extra link dummy
PASSED
test_portchannel.py::TestPortchannel::test_Portchannel_oper_down PASSED

$ sudo ip netns exec sw-srv0 ip -d link show eth0
1408: eth0@if1407: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether e2:62:28:06:a9:84 brd ff:ff:ff:ff:ff:ff link-netnsid 1 promiscuity 0 
    veth addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 

$ sudo pytest -v --dvsname=vs -s test_port.py 
================================================================ test session starts =================================================================
platform linux2 -- Python 2.7.13, pytest-4.6.9, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python2
cachedir: .pytest_cache
rootdir: /home/wendani/sonic-buildimage-201911/src/sonic-swss/tests
plugins: flaky-3.7.0
collected 6 items                                                                                                                                    

test_port.py::TestPort::test_PortMtu remove extra link dummy
PASSED
test_port.py::TestPort::test_PortNotification PASSED
test_port.py::TestPort::test_PortFec PASSED
test_port.py::TestPort::test_PortPreemp PASSED
test_port.py::TestPort::test_PortIdriver PASSED
test_port.py::TestPort::test_PortIpredriver PASSED

============================================================= 6 passed in 55.92 seconds ==============================================================

Details if related

Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
@prsunny prsunny merged commit 0e1b9be into sonic-net:master Sep 30, 2020
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Oct 2, 2020
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>

Co-authored-by: wenda.ni <wenda.ni@bytedance.com>
theasianpianist added a commit to theasianpianist/sonic-swss that referenced this pull request Oct 2, 2020
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>

Co-authored-by: wenda.ni <wenda.ni@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants