Skip to content

[Sub-ports] Added test case which validates that packets are routed between sub-ports and SVI/L3 interface#3649

Merged
wangxin merged 2 commits intosonic-net:masterfrom
OleksandrKozodoi:add_routing_between_sub_ports_and_port_test_case
Jul 8, 2021
Merged

[Sub-ports] Added test case which validates that packets are routed between sub-ports and SVI/L3 interface#3649
wangxin merged 2 commits intosonic-net:masterfrom
OleksandrKozodoi:add_routing_between_sub_ports_and_port_test_case

Conversation

@OleksandrKozodoi
Copy link
Copy Markdown
Contributor

Signed-off-by: Oleksandr Kozodoi oleksandrx.kozodoi@intel.com

Description of PR

Summary:

Note:

Tests verify two cases of routing between sub-ports:

  1. Routing between sub-ports and SVI
  2. Routing between sub-ports and L3 interface

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

Coverage of sub-ports feature by test cases to improve the quality of SONiC.

How did you do it?

Added new test cases to PyTest.
Implementation is based on the Sub-ports design spec

How did you verify/test it?

py.test --testbed=testbed-t0 --inventory=../ansible/lab --testbed_file=../ansible/testbed.csv --host-pattern=testbed-t0 -- module-path=../ansible/library sub_port_interfaces

Any platform specific information?

SONiC Software Version: SONiC.master.162-dirty-20210331.125032
Distribution: Debian 10.9
Kernel: 4.19.0-12-2-amd64
Build commit: ecaf97d
Build date: Wed Mar 31 13:09:26 UTC 2021
Platform: x86_64-arista_7170_32cd
HwSKU: Arista-7170-32CD-C32
ASIC: barefoot

Supported testbed topology if it's a new test case?

T0, T1

Documentation

…etween sub-ports and SVI/L3 interface

Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
@OleksandrKozodoi OleksandrKozodoi requested a review from a team as a code owner June 9, 2021 15:24
@OleksandrKozodoi
Copy link
Copy Markdown
Contributor Author

PR cannot be merged until merging of #3525. New test cases use the new tool for finding TCP/UDP packets in the buffer.

@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Jun 9, 2021

This pull request introduces 1 alert and fixes 1 when merging 22cbe74 into 4327148 - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

fixed alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Jun 9, 2021

This pull request fixes 1 alert when merging e87fc47 into 4327148 - view on LGTM.com

fixed alerts:

  • 1 for Unused local variable

@OleksandrKozodoi
Copy link
Copy Markdown
Contributor Author

@wangxin Could you please review?

@wangxin
Copy link
Copy Markdown
Collaborator

wangxin commented Jun 28, 2021

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Collaborator

@wangxin wangxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you resolve the PR testing failure caused by this change?

2021-06-28T10:01:32.0202577Z ==================================== ERRORS ====================================
2021-06-28T10:01:32.0203441Z ________________________ ERROR collecting test session _________________________
2021-06-28T10:01:32.0205305Z /usr/local/lib/python2.7/dist-packages/py/_path/common.py:383: in visit
2021-06-28T10:01:32.0206067Z     for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
2021-06-28T10:01:32.0207185Z /usr/local/lib/python2.7/dist-packages/py/_path/common.py:425: in gen
2021-06-28T10:01:32.0207764Z     if p.check(dir=1) and (rec is None or rec(p))])
2021-06-28T10:01:32.0208867Z /usr/local/lib/python2.7/dist-packages/_pytest/main.py:667: in _recurse
2021-06-28T10:01:32.0209413Z     ihook = self.gethookproxy(dirpath)
2021-06-28T10:01:32.0210214Z /usr/local/lib/python2.7/dist-packages/_pytest/main.py:482: in gethookproxy
2021-06-28T10:01:32.0210886Z     my_conftestmodules = pm._getconftestmodules(fspath)
2021-06-28T10:01:32.0212050Z /usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:424: in _getconftestmodules
2021-06-28T10:01:32.0212834Z     mod = self._importconftest(conftestpath.realpath())
2021-06-28T10:01:32.0213929Z /usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:463: in _importconftest
2021-06-28T10:01:32.0214338Z     raise ConftestImportFailure(conftestpath, sys.exc_info())
2021-06-28T10:01:32.0215735Z E   ConftestImportFailure: (local('/var/src/s/tests/sub_port_interfaces/conftest.py'), (<type 'exceptions.ImportError'>, ImportError('No module named pkt_filter.filter_pkt_in_buffer',), <traceback object at 0x7f1567a6d050>))

@OleksandrKozodoi
Copy link
Copy Markdown
Contributor Author

Can you resolve the PR testing failure caused by this change?

2021-06-28T10:01:32.0202577Z ==================================== ERRORS ====================================
2021-06-28T10:01:32.0203441Z ________________________ ERROR collecting test session _________________________
2021-06-28T10:01:32.0205305Z /usr/local/lib/python2.7/dist-packages/py/_path/common.py:383: in visit
2021-06-28T10:01:32.0206067Z     for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
2021-06-28T10:01:32.0207185Z /usr/local/lib/python2.7/dist-packages/py/_path/common.py:425: in gen
2021-06-28T10:01:32.0207764Z     if p.check(dir=1) and (rec is None or rec(p))])
2021-06-28T10:01:32.0208867Z /usr/local/lib/python2.7/dist-packages/_pytest/main.py:667: in _recurse
2021-06-28T10:01:32.0209413Z     ihook = self.gethookproxy(dirpath)
2021-06-28T10:01:32.0210214Z /usr/local/lib/python2.7/dist-packages/_pytest/main.py:482: in gethookproxy
2021-06-28T10:01:32.0210886Z     my_conftestmodules = pm._getconftestmodules(fspath)
2021-06-28T10:01:32.0212050Z /usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:424: in _getconftestmodules
2021-06-28T10:01:32.0212834Z     mod = self._importconftest(conftestpath.realpath())
2021-06-28T10:01:32.0213929Z /usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:463: in _importconftest
2021-06-28T10:01:32.0214338Z     raise ConftestImportFailure(conftestpath, sys.exc_info())
2021-06-28T10:01:32.0215735Z E   ConftestImportFailure: (local('/var/src/s/tests/sub_port_interfaces/conftest.py'), (<type 'exceptions.ImportError'>, ImportError('No module named pkt_filter.filter_pkt_in_buffer',), <traceback object at 0x7f1567a6d050>))

Hi @wangxin. This error is expected. New test cases use the tool from #3525. So this PR cannot be merged until merging #3525. Thanks for your comment!

@wangxin
Copy link
Copy Markdown
Collaborator

wangxin commented Jul 8, 2021

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit 2d57a67 into sonic-net:master Jul 8, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…etween sub-ports and SVI/L3 interface (sonic-net#3649)

What is the motivation for this PR?
Coverage of sub-ports feature by test cases to improve the quality of SONiC.

How did you do it?
Added new test cases to PyTest.
Implementation is based on the Sub-ports design spec

How did you verify/test it?
py.test --testbed=testbed-t0 --inventory=../ansible/lab --testbed_file=../ansible/testbed.csv --host-pattern=testbed-t0 -- module-path=../ansible/library sub_port_interfaces

Any platform specific information?
SONiC Software Version: SONiC.master.162-dirty-20210331.125032
Distribution: Debian 10.9
Kernel: 4.19.0-12-2-amd64
Build commit: ecaf97d
Build date: Wed Mar 31 13:09:26 UTC 2021
Platform: x86_64-arista_7170_32cd
HwSKU: Arista-7170-32CD-C32
ASIC: barefoot

Supported testbed topology if it's a new test case?
T0, T1

Signed-off-by: Oleksandr Kozodoi <oleksandrx.kozodoi@intel.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
- What I did
Ported a fix from libteam master to our master.
Fixes sonic-net#4070
Fixes sonic-net#3649

- How I did it
Applied patch jpirko/libteam@c723737 from upstream.

- How to verify it
Build image for your DUT and warm-reboot your DUT 10 times. Check that all PortChannels are up and no error messages in teamd.log
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