Skip to content

Add new tests for Link Local SIP/DIP#14019

Closed
SavchukRomanLv wants to merge 1 commit intosonic-net:202311from
SavchukRomanLv:ip_link_local
Closed

Add new tests for Link Local SIP/DIP#14019
SavchukRomanLv wants to merge 1 commit intosonic-net:202311from
SavchukRomanLv:ip_link_local

Conversation

@SavchukRomanLv
Copy link

Description of PR

Summary:
Update PR # (#11940), as FO changed this test will be covered by @SavchukRomanLv

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

To verify that MSFT hwsku will allow packets with link-local source/destination IP to be forwarded by the dut. This capability is only supported on systems that have SAI_NOT_DROP_SIP_DIP_LINK_LOCAL=1 in sai.profile

How did you do it?

Revised the existing IP test and used common functionality, also reviewed the test plan, and implemented tests accordingly.

How did you verify/test it?

run it on all topologies to check the stability

Any platform specific information?

systems that have SAI_NOT_DROP_SIP_DIP_LINK_LOCAL=1 in sai.profile

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

any

Documentation

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Failed
- hook id: check-ast
- exit code: 1

tests/ip/link_local/test_link_local_ip.py: failed parsing with CPython 3.10.12:

Traceback (most recent call last):
File "/home/AzDevOps/.cache/pre-commit/repo2fn9f097/py_env-python3/lib/python3.10/site-packages/pre_commit_hooks/check_ast.py", line 21, in main
ast.parse(f.read(), filename=filename)
File "/usr/lib/python3.10/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "tests/ip/link_local/test_link_local_ip.py", line 85
pytest.skip(f"Test case not supported at {tbinfo["topo"]["name"]} topology")
^^^^
SyntaxError: f-string: unmatched '['
...
[truncated extra lines, please run pre-commit locally to view full check results]

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/ip/link_local/test_link_local_ip.py:122:121: E501 line too long (139 > 120 characters)
tests/ip/link_local/test_link_local_ip.py:123:121: E501 line too long (121 > 120 characters)
tests/ip/link_local/test_link_local_ip.py:128:121: E501 line too long (122 > 120 characters)
tests/ip/link_local/test_link_local_ip.py:131:121: E501 line too long (122 > 120 characters)
tests/ip/link_local/test_link_local_ip.py:178:121: E501 line too long (127 > 120 characters)

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@SavchukRomanLv
Copy link
Author

@bingwang-ms can you assign engineer to review

@liat-grozovik
Copy link
Collaborator

@bingwang-ms @yxieca kindly reminder to assign a reviewer

@bingwang-ms
Copy link
Collaborator

@prsunny, @kperumalbfn Could you please help review?

@SavchukRomanLv
Copy link
Author

Hi @prsunny , @kperumalbfn please approve

@bingwang-ms
Copy link
Collaborator

Hi @prsunny , @kperumalbfn A kindly reminder.

@prsunny
Copy link
Contributor

prsunny commented Apr 18, 2025

The test should first go to master and then cherry-pick based on branch approvers. I see the master PR is closed.

@illia-kotvitskyi
Copy link
Contributor

Created a separate PR with the master target branch: #18906
@nhe-NV, do you know if we can close this PR without the author?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants