Skip to content

add a test to verify the operation of the portstat tool#1085

Merged
lguohan merged 5 commits intosonic-net:masterfrom
IGNW:lafe-72-merge-portstat-into-azure
Sep 27, 2019
Merged

add a test to verify the operation of the portstat tool#1085
lguohan merged 5 commits intosonic-net:masterfrom
IGNW:lafe-72-merge-portstat-into-azure

Conversation

@joej164
Copy link
Contributor

@joej164 joej164 commented Aug 27, 2019

portstat_t1_eight_output.log

portstat_t0_eight_output.log

Description of PR

Adding a test to test the portstat command

Summary:
Exercises various command options with the portstat command to verify the do what it is supposed to and does not cause tracebacks.

NOTE: several tests fail since during testing, it was found that several of the portstat command cause tracebacks.

Type of change

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

Approach

Used the shell command to send variations of the portstat command to the DUT to verify operation.

How did you do it?

Using various sub files to test the operation of the command

How did you verify/test it?

Ran the test on the t0-8 and the t1-8 testbed

Any platform specific information?

None

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

Should work on all topologies, just exercizing the portstat command

Documentation

Updated the README.test.md file with the new command

Test Results

ansible-playbook -i lab test_sonic.yml -e testbed_name=t0-eight -e testcase_name=portstat

"PLAY RECAP *********************************************************************
lab-ignw-seastone-dut-li1 : ok=186 changed=54 unreachable=0 failed=3

Thursday 22 August 2019 22:11:37 +0000 (0:00:00.076) 0:02:35.505 *******

TASK: test : Run the commands ------------------------------------------- 8.74s
TASK: test : wait a few seconds for data to repopulate ------------------ 5.20s
TASK: test : wait a few seconds for data to repopulate ------------------ 5.18s
TASK: test : create several test stats files ---------------------------- 3.88s
TASK: test : create several test stats files ---------------------------- 3.82s
TASK: test : create several test stats files ---------------------------- 3.81s
TASK: test : create several test stats files ---------------------------- 3.74s
TASK: test : create several test stats files ---------------------------- 3.24s
TASK: test : create several test stats files ---------------------------- 3.20s
TASK: test : Test display period ---------------------------------------- 2.80s
TASK: test : Test deleting a tag ---------------------------------------- 2.54s
TASK: test : Test display all ------------------------------------------- 2.51s
TASK: test : verify that the file names are in the directory ------------ 2.00s
TASK: test : Verify port channel interfaces are up correctly ------------ 1.97s
TASK: test : run the command -------------------------------------------- 1.95s
TASK: test : create the list of files to not be deleted ----------------- 1.92s
TASK: test : run the command -------------------------------------------- 1.91s
TASK: test : create the list of files to not be deleted ----------------- 1.90s
TASK: test : verify that the file names are in the directory ------------ 1.90s
TASK: test : verify that the file names are in the directory ------------ 1.87s"

ansible-playbook -i lab test_sonic.yml -e testbed_name=t1-eight -e testcase_name=portstat

"PLAY RECAP *********************************************************************
lab-ignw-seastone-dut-li1 : ok=182 changed=55 unreachable=0 failed=3

Thursday 22 August 2019 21:14:33 +0000 (0:00:00.087) 0:02:31.148 *******

TASK: test : Run the commands ------------------------------------------- 8.57s
TASK: test : wait a few seconds for data to repopulate ------------------ 5.17s
TASK: test : wait a few seconds for data to repopulate ------------------ 5.16s
TASK: test : create several test stats files ---------------------------- 3.91s
TASK: test : create several test stats files ---------------------------- 3.88s
TASK: test : create several test stats files ---------------------------- 3.88s
TASK: test : create several test stats files ---------------------------- 3.77s
TASK: test : create several test stats files ---------------------------- 3.21s
TASK: test : create several test stats files ---------------------------- 3.20s
TASK: test : Test display period ---------------------------------------- 2.85s
TASK: test : Test deleting a tag ---------------------------------------- 2.59s
TASK: test : Test display all ------------------------------------------- 2.52s
TASK: test : run the command -------------------------------------------- 2.03s
TASK: test : verify that the file names are in the directory ------------ 1.99s
TASK: test : create the list of files to not be deleted ----------------- 1.98s
TASK: test : create the list of files to not be deleted ----------------- 1.98s
TASK: test : verify that the file names are in the directory ------------ 1.96s
TASK: test : verify that the file names are in the directory ------------ 1.95s
TASK: test : verify that the file names are in the directory ------------ 1.94s
TASK: test : run the command -------------------------------------------- 1.93s"

Joe Lazaro and others added 4 commits July 25, 2019 15:52

##### Portstat test
```
ansible-playbook test_sonic.yml -i {INVENTORY} -e testcase_name=portstat -e testbed_name={TESTBED_NAME}
Copy link

Choose a reason for hiding this comment

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

A minor update.
kindly add the "--limit" as an option providing flexibility to users to select the DUT they want to use to run tests.

ansible-playbook test_sonic.yml -i {INVENTORY} --limit {DUT_NAME} -e testcase_name=portstat -e testbed_name={TESTBED_NAME}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updates as requested

Copy link

@samaity samaity left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@lguohan lguohan merged commit 4e1bb66 into sonic-net:master Sep 27, 2019
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Update sonic-sairedis submodule pointer to include the following:

0994449 [asan] suppress the static variable leaks (sonic-net#1085) (sonic-net#1159)
6fc86a9 Switch to using stock gcovr 5.2 (sonic-net#1174) (sonic-net#1190)
e7ded51 Create fabric ports for switch_type fabric (sonic-net#1189)
f498261 * Add Voqs to Virtual Switch (sonic-net#1162)

Signed-off-by: Yakiv Huryk <[email protected]>
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.

3 participants