Skip to content

Fix 'drop_packets/test_configurable_drop_counters.py' on dualtor#12996

Merged
StormLiangMS merged 2 commits intosonic-net:masterfrom
anishb-arista:fix_test_configurable_drop_counters
Jun 6, 2024
Merged

Fix 'drop_packets/test_configurable_drop_counters.py' on dualtor#12996
StormLiangMS merged 2 commits intosonic-net:masterfrom
anishb-arista:fix_test_configurable_drop_counters

Conversation

@anishb-arista
Copy link
Copy Markdown
Contributor

@anishb-arista anishb-arista commented May 27, 2024

Description of PR

Summary:
Fixes #133

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?

Fix the failure of the test 'drop_packets/test_configurable_drop_counters.py' on dualtor testbeds

How did you do it?

Toggled all mux simulator ports to the selected tor before sending traffic

How did you verify/test it?

Tested on Arista-7050 and Arista-7260 platforms

Any platform specific information?

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

Documentation

@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.........................................................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/drop_packets/test_configurable_drop_counters.py:202:25: F811 redefinition of unused 'toggle_all_simulator_ports_to_rand_selected_tor_m' from line 27
tests/drop_packets/test_configurable_drop_counters.py:229:25: F811 redefinition of unused 'toggle_all_simulator_ports_to_rand_selected_tor_m' from line 27

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>

@lolyu
Copy link
Copy Markdown
Collaborator

lolyu commented May 27, 2024

Thanks for the fix, could you please check the pre-commit check failure?

@anishb-arista
Copy link
Copy Markdown
Contributor Author

anishb-arista commented May 28, 2024

Thanks for the fix, could you please check the pre-commit check failure?

Done

@lolyu
Copy link
Copy Markdown
Collaborator

lolyu commented May 28, 2024

Hi @yxieca, could you please help review?

Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit 6fcf67c into sonic-net:master Jun 6, 2024
@StormLiangMS
Copy link
Copy Markdown
Collaborator

@yxieca for 202311 cherry pick.

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 6, 2024
…ic-net#12996)

What is the motivation for this PR?
Fix the failure of the test 'drop_packets/test_configurable_drop_counters.py' on dualtor testbeds

How did you do it?
Toggled all mux simulator ports to the selected tor before sending traffic

How did you verify/test it?
Tested on Arista-7050 and Arista-7260 platforms
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202305: #13160

mssonicbld pushed a commit that referenced this pull request Jun 6, 2024
)

What is the motivation for this PR?
Fix the failure of the test 'drop_packets/test_configurable_drop_counters.py' on dualtor testbeds

How did you do it?
Toggled all mux simulator ports to the selected tor before sending traffic

How did you verify/test it?
Tested on Arista-7050 and Arista-7260 platforms
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 12, 2024
…ic-net#12996)

What is the motivation for this PR?
Fix the failure of the test 'drop_packets/test_configurable_drop_counters.py' on dualtor testbeds

How did you do it?
Toggled all mux simulator ports to the selected tor before sending traffic

How did you verify/test it?
Tested on Arista-7050 and Arista-7260 platforms
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202311: #13239

mssonicbld pushed a commit that referenced this pull request Jun 12, 2024
)

What is the motivation for this PR?
Fix the failure of the test 'drop_packets/test_configurable_drop_counters.py' on dualtor testbeds

How did you do it?
Toggled all mux simulator ports to the selected tor before sending traffic

How did you verify/test it?
Tested on Arista-7050 and Arista-7260 platforms
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 12, 2024
…ic-net#12996)

What is the motivation for this PR?
Fix the failure of the test 'drop_packets/test_configurable_drop_counters.py' on dualtor testbeds

How did you do it?
Toggled all mux simulator ports to the selected tor before sending traffic

How did you verify/test it?
Tested on Arista-7050 and Arista-7260 platforms
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #13250

mssonicbld pushed a commit that referenced this pull request Jun 13, 2024
)

What is the motivation for this PR?
Fix the failure of the test 'drop_packets/test_configurable_drop_counters.py' on dualtor testbeds

How did you do it?
Toggled all mux simulator ports to the selected tor before sending traffic

How did you verify/test it?
Tested on Arista-7050 and Arista-7260 platforms
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