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

[multi-dut] Making loganalyzer fixture work with multiple DUTs in multi-dut testbed #2809

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

sanmalho-git
Copy link
Contributor

@sanmalho-git sanmalho-git commented Jan 14, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

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

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.

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).

This functionality is required more so for a T2 chassis, where affects of action on
one linecard (one DUT in the testbed) on another linecard (another DUT in the testbed)
could be ignored.

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.
@wangxin wangxin merged commit f302699 into sonic-net:master Jan 25, 2021
@sanmalho-git sanmalho-git deleted the analyzer branch January 25, 2021 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants