[platform][test_auto_negotiation] Fix issue where the port selection exceed boundary#4055
Merged
Blueve merged 15 commits intosonic-net:masterfrom Aug 24, 2021
Merged
Conversation
Blueve
commented
Aug 17, 2021
| logger.info('Collecting existing port configuration for DUT and fanout...') | ||
| for duthost in duthosts: | ||
| if dutname == 'unknown' or dutname == duthost.hostname: | ||
| all_ports = build_test_candidates(duthost, fanouthosts, portname) |
Collaborator
Author
There was a problem hiding this comment.
We will get a list that contains only 1 port by this way.
If we want to enumerate all ports, we have to put "all_ports" in it parameter list.
|
This pull request introduces 1 alert when merging c359fa7 into 55b8b67 - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging d790a35 into 55b8b67 - view on LGTM.com new alerts:
|
4 tasks
yxieca
approved these changes
Aug 23, 2021
sujinmkang
reviewed
Aug 23, 2021
vmittal-msft
pushed a commit
to vmittal-msft/sonic-mgmt
that referenced
this pull request
Sep 28, 2021
…exceed boundary (sonic-net#4055) * [platform][test_auto_negotiation] Fix issue where the port selection exceed boundary * Enumerate all ports for selecting candidaties * Only do the sampling for DUT once * Refactor test * Skip test if fanout does not support setting auto-neg mode * Support new eos hardware command Signed-off-by: Jing Kan [email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
This PR is for fixing an issue hwere the port selection exceed boundary in
test_auto_negotiation.The issue were introduced from this PR: #3376
According the original code, the intend is to build a candidates list before run testing. However we will only get one candidate if we put a dedicate port name to
build_test_candidates()and then all test will failed to setup due to we cannot sampling 3 ports from a list that contains only 1 item.Type of change
Back port request
Approach
What is the motivation for this PR?
The issue were introduced from this PR: #3376
According the original code, the intend is to build a candidates list before run testing. However we will only get one candidate if we put a dedicate port name to
build_test_candidates()and then all test will failed to setup due to we cannot sampling 3 ports from a list that contains only 1 item.How did you do it?
test_force_speedandtest_auto_negotiation_advertised_each_speedparameterlizeHow did you verify/test it?
Test on physical DUT which connected to a fanout that not support auto-neg
Test on physical DUT which support auto-neg
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation