Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:16135] [test_genric_hash.py]: cisco platform checks fix #16496

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

mssonicbld
Copy link
Collaborator

Description of PR

Cisco support different HASH algorithms and fields as of now than default

Some issues were because CISCO was not supporting certain hash algorithms and Fields which led to issues like below

/12/2024 03:58:04 __init__.pytest_runtest_call L0040 ERROR | Traceback (most recent call last):
 File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 1788, in runtest
 self.ihook.pytest_pyfunc_call(pyfuncitem=self)
 File "/usr/local/lib/python3.8/dist-packages/pluggy/_hooks.py", line 513, in __call__
 return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
 File "/usr/local/lib/python3.8/dist-packages/pluggy/_manager.py", line 120, in _hookexec
 return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
 File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 139, in _multicall
 raise exception.with_traceback(exception.__traceback__)
 File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 103, in _multicall
 res = hook_impl.function(*args)
 File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
 result = testfunction(**testargs)
 File "/data/tests/hash/test_generic_hash.py", line 151, in test_ecmp_hash
 lag_hash_fields.remove(ecmp_test_hash_field)
ValueError: list.remove(x): x not in list

some algorithm config is missing i have listed one of many errors whose root cause is same

Summary:
Fixes # (issue)

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 add support for CISCO specific supported hash alogrithms and fields

How did you do it?

  • added asic_type = 'cisco-8000'check for platform specific algo and fields to be picked

How did you verify/test it?

Tested it on T1/T0 cisco platforms where correct calulation was done after my fox and only supported fields were picked

Any platform specific information?

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

Documentation

* [test_genric_hash.py]: cisco platform checks and some check_balance fix

* line spaces and artifact fixes

* indent fix

* check_balance fixes revert commit
@mssonicbld
Copy link
Collaborator Author

/azp run

@mssonicbld
Copy link
Collaborator Author

Original PR: #16135

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator Author

/azp run Azure.sonic-mgmt

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator Author

/azp run Azure.sonic-mgmt

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit fcd9d65 into sonic-net:202405 Jan 15, 2025
13 checks passed
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.

2 participants