Skip to content

Fix syntax error in conditional mark for copp/test_copp.py.#11994

Closed
vivekverma-arista wants to merge 2 commits intosonic-net:masterfrom
vivekverma-arista:fix-conditional-mark-syntax
Closed

Fix syntax error in conditional mark for copp/test_copp.py.#11994
vivekverma-arista wants to merge 2 commits intosonic-net:masterfrom
vivekverma-arista:fix-conditional-mark-syntax

Conversation

@vivekverma-arista
Copy link
Copy Markdown
Contributor

@vivekverma-arista vivekverma-arista commented Mar 14, 2024

Description of PR

Summary: Fix syntax error in conditional mark for copp/test_copp.py.
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?

Syntax error introduced by: #5097

copp/test_copp.py don't get skipped even where they are suppose to as the conditional mark evaluation fails as follows :-

10:50:18 __init__.evaluate_condition              L0498 ERROR  | Failed to evaluate condition, raw_condition=(topo_name not in ['ptf32', 'ptf64', 't0'
, 't0-64', 't0-52', 't0-116', 't1', 't1-lag', 't1-64-lag', 't1-56-lag', 't1-backend', 'm0', 'mx'] and 't2' not in topo), condition_str=(topo_name not
in ['ptf32', 'ptf64', 't0', 't0-64', 't0-52', 't0-116', 't1', 't1-lag', 't1-64-lag', 't1-56-lag', 't1-backend', 'm0', 'mx'] and 't2' not in topo)

How did you do it?

Corrected the syntax.

The fix is 't2' not in topo_name. The substring check is used in order to allow the test to run on all 't2-*' topologies with out explicitly having to list them all in the array for the explicit topo_name in checks.

How did you verify/test it?

Verified on Arista-7260CX3 platform that copp/test_copp.py get skipped correctly on t0-dualtor.

Any platform specific information?

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

Documentation

@vivekverma-arista
Copy link
Copy Markdown
Contributor Author

This was fixed in #8827, hence closing this pull request.

@vivekverma-arista vivekverma-arista deleted the fix-conditional-mark-syntax branch June 13, 2024 09:57
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.

1 participant