[multi-dut] Making loganalyzer fixture work with multiple DUTs in multi-dut testbed #2809
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:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
In a multi-dut testbed, the existing loganalyzer plugin takes 'rand_one_dut_hostname'
and thus analyzes only a single DUT.
However, when testing multiple DUTs (instead of rand-one-dut-hostname), the log analyzer
would run on one randomly chosen DUT, while the test is repeated on multiple DUTs.
Moreover, in a multi-dut testbet for a T2 chassis, we need to analyze the logs on all the DUTS,
where affects of action on one linecard (one DUT in the testbed) on another linecard
(another DUT in the testbed) could be ignored.
How did you do it?
This PR makes the logAnalyzer run on all the DUTs in a multi-dut testbed.
Even f the test is parameterized with a hostname of one of the DUTS in duthosts,
we would analyze all the DUTs in duthosts (all DUTs in the testbed).
Changed the return value of loganalyzer fixture to be a dictionary keyed
with the hostname of the DUTs, and the value being the analyzer object.
Modified tests that are using loganalyzer (to add more exceptions etc.) to use
the new dictionary structure. If the test is running on a single DUT, then
we modify the loganalyzer object associated with just that DUT.
How did you verify/test it?
Ran test_features (enumerated using enum_dut_hostname) and validated that the analyzer is run on all the DUTs as the one that the test is ran.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation