sonic-mgmt icon indicating copy to clipboard operation
sonic-mgmt copied to clipboard

Add test coverage for sfp eeprom dump

Open nhe-NV opened this issue 1 year ago • 12 comments

Add test coverage for "Dump SFP EEPROM page data in show techsupport command", here is the HLD: https://github.com/sonic-net/SONiC/blob/master/doc/sfputil/dump_sfp_eeprom.md

Description of PR

Summary: Fixes # (issue)

Type of change

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

Back port request

  • [ ] 201911
  • [ ] 202012
  • [ ] 202205
  • [ ] 202305
  • [x] 202311

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Run the relavent test case, and it pass.

Any platform specific information?

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

Documentation

nhe-NV avatar Jun 04 '24 04:06 nhe-NV

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/platform_tests/sfp/test_sfputil.py:103:31: E128 continuation line under-indented for visual indent
tests/platform_tests/sfp/test_sfputil.py:120:1: E302 expected 2 blank lines, found 1
tests/platform_tests/sfp/util.py:45:41: W605 invalid escape sequence 'd'

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>

mssonicbld avatar Jun 04 '24 04:06 mssonicbld

The pre-commit check is mandatory. Please help have a look.

wsycqyz avatar Jun 07 '24 02:06 wsycqyz

/azpw run

nhe-NV avatar Jun 29 '24 13:06 nhe-NV

/AzurePipelines run

mssonicbld avatar Jun 29 '24 13:06 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jun 29 '24 13:06 azure-pipelines[bot]

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/platform_tests/sfp/test_sfputil.py:125:31: E128 continuation line under-indented for visual indent
tests/platform_tests/sfp/test_sfputil.py:142:1: E302 expected 2 blank lines, found 1
tests/platform_tests/sfp/util.py:45:41: W605 invalid escape sequence 'd'

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>

mssonicbld avatar Jun 29 '24 13:06 mssonicbld

/azpw run

nhe-NV avatar Jul 01 '24 01:07 nhe-NV

/AzurePipelines run

mssonicbld avatar Jul 01 '24 01:07 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 01 '24 01:07 azure-pipelines[bot]

/azpw run

nhe-NV avatar Jul 08 '24 09:07 nhe-NV

/AzurePipelines run

mssonicbld avatar Jul 08 '24 09:07 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 08 '24 09:07 azure-pipelines[bot]

/azpw run

nhe-NV avatar Jul 20 '24 02:07 nhe-NV

/AzurePipelines run

mssonicbld avatar Jul 20 '24 02:07 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 20 '24 02:07 azure-pipelines[bot]

/azpw run

nhe-NV avatar Jul 30 '24 09:07 nhe-NV

/AzurePipelines run

mssonicbld avatar Jul 30 '24 09:07 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 30 '24 09:07 azure-pipelines[bot]

/azpw run

nhe-NV avatar Aug 23 '24 23:08 nhe-NV

/AzurePipelines run

mssonicbld avatar Aug 23 '24 23:08 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 23 '24 23:08 azure-pipelines[bot]

/azpw run

nhe-NV avatar Aug 27 '24 02:08 nhe-NV

/AzurePipelines run

mssonicbld avatar Aug 27 '24 02:08 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 27 '24 02:08 azure-pipelines[bot]

/azpw run

nhe-NV avatar Aug 30 '24 14:08 nhe-NV

/AzurePipelines run

mssonicbld avatar Aug 30 '24 14:08 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 30 '24 14:08 azure-pipelines[bot]

/azp run

mssonicbld avatar Dec 18 '24 10:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 18 '24 10:12 azure-pipelines[bot]

@prgeor, @mihirpat1 Can you help reivew?

bingwang-ms avatar Dec 18 '24 17:12 bingwang-ms