Skip to content

Add python3 support to case test_ipinip_hash and test_ipinip_hash_negative of fib test#11964

Closed
echuawu wants to merge 1 commit intosonic-net:masterfrom
echuawu:add_python3_support_to_fib_test_new
Closed

Add python3 support to case test_ipinip_hash and test_ipinip_hash_negative of fib test#11964
echuawu wants to merge 1 commit intosonic-net:masterfrom
echuawu:add_python3_support_to_fib_test_new

Conversation

@echuawu
Copy link
Copy Markdown
Contributor

@echuawu echuawu commented Mar 13, 2024

Description of PR

Add python 3 support to fib test

Including 2 cases test_ipinip_hash and test_ipinip_hash_negative

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

It was found that the 2 cases are still using python 2 when running PTF test

How did you do it?

Add python 3 support

How did you verify/test it?

Validate it by local run

Any platform specific information?

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

Documentation

@liat-grozovik
Copy link
Copy Markdown
Collaborator

@nhe-NV @roy-sror could you please review?

@liat-grozovik
Copy link
Copy Markdown
Collaborator

@wangxin kindly help to review or suggest someone to do so

@bingwang-ms
Copy link
Copy Markdown
Collaborator

The test_ipinip_hash was skipped on Mellanox platform because of a known limitation. #8398
Is the issue resolved?

@echuawu
Copy link
Copy Markdown
Contributor Author

echuawu commented Jul 24, 2024

The test_ipinip_hash was skipped on Mellanox platform because of a known limitation. #8398 Is the issue resolved?

It has not been fixed. And it's not conflict with this PR, it just update the test script.

bingwang-ms
bingwang-ms previously approved these changes Aug 20, 2024
@bingwang-ms
Copy link
Copy Markdown
Collaborator

Please fix the conflict.

Including 2 cases test_ipinip_hash and test_ipinip_hash_negative

Change-Id: I1237afac9c8ed091acf42b9d6ffc8ca81f1af9b8
@echuawu echuawu force-pushed the add_python3_support_to_fib_test_new branch from 27e249c to 74ad4f2 Compare October 24, 2024 08:10
@mssonicbld
Copy link
Copy Markdown
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.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing tests/fib/test_fib.py

check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Passed
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>

@echuawu
Copy link
Copy Markdown
Contributor Author

echuawu commented Oct 24, 2024

Please fix the conflict.

Done

@echuawu
Copy link
Copy Markdown
Contributor Author

echuawu commented Oct 24, 2024

PR #13867 and #13326 had done the same thing, so close my PR.

@echuawu echuawu closed this Oct 24, 2024
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.

6 participants