-
Notifications
You must be signed in to change notification settings - Fork 667
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
[pcieutil] Add 'pcie-aer' sub-command to display AER stats #1169
[pcieutil] Add 'pcie-aer' sub-command to display AER stats #1169
Conversation
This pull request fixes 1 alert when merging ce8cacd into 3a7457c - view on LGTM.com fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add unit tests.
Sure. Will add a mock class for PcieUtil (sonic_platform_base/sonic_pcie) to provide get_pcie_check method |
4ea2664
to
37e29da
Compare
Have added unit tests for pcie-aer commands
|
- Include UT cases for device, no-zero options
This pull request introduces 1 alert when merging 586bc75 into 57a0b41 - view on LGTM.com new alerts:
|
Commits have to added to include '-nz/--no-zero', '-d/--device' options for PCIe AER subcommands and their UT cases.
|
…ption) - Add '-v/--verbose' option for PCIe AER subcommands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
@ArunSaravananBalachandran What is unit test coverage ? |
@sujinmkang, unit test coverage and test cases are as below:
|
@lguohan |
Unit test has been added and covered for the PR portion.
…#1169) - What I did Add new "pcie-aer" sub-command in pcieutil to display the AER stats. "pcieutil pcie-aer" has four sub-commands - 'all', 'correctable', 'fatal' and 'non-fatal'. 'all' command displays the AER stats for all severities. 'correctable', 'fatal' and 'non-fatal' commands display the AER stats of respective severity. 'device', 'no-zero' options for pcie-aer sub commands ``` root@sonic:/home/admin# pcieutil pcie-aer Usage: pcieutil pcie-aer [OPTIONS] COMMAND [ARGS]... Display PCIe AER status Options: --help Show this message and exit. Commands: all Show all PCIe AER attributes correctable Show PCIe AER correctable attributes fatal Show PCIe AER fatal attributes non-fatal Show PCIe AER non-fatal attributes root@sonic:/home/admin# root@sonic:/home/admin# pcieutil pcie-aer all --help Usage: pcieutil pcie-aer all [OPTIONS] Show all PCIe AER attributes Options: -d, --device <BUS>:<DEV>.<FN> Display stats only for the specified device -nz, --no-zero Display non-zero AER stats --help Show this message and exit. root@sonic:/home/admin# ``` Depends on: sonic-net/sonic-platform-daemons#100 - How I did it Add new functions in pcieutil, to implement sub-commands for retrieving AER stats from STATE_DB and output it in tabular format.
- What I did
Add new "pcie-aer" sub-command in pcieutil to display the AER stats.
"pcieutil pcie-aer" has four sub-commands - 'all', 'correctable', 'fatal' and 'non-fatal'.
Depends on: sonic-net/sonic-platform-daemons#100
- How I did it
Add new functions in pcieutil, to implement sub-commands for retrieving AER stats from STATE_DB and output it in tabular format.
- How to verify it
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)