-
Notifications
You must be signed in to change notification settings - Fork 727
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
Skip the "show platform ssdhealth" test for non-SSD platform #4807
base: master
Are you sure you want to change the base?
Conversation
@@ -313,6 +313,11 @@ def test_show_platform_ssdhealth(duthosts, enum_supervisor_dut_hostname): | |||
@summary: Verify output of `show platform ssdhealth` | |||
""" | |||
duthost = duthosts[enum_supervisor_dut_hostname] | |||
cmd = "cat /sys/block/sda/queue/rotational" |
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 is very hardware specific, some platform does not have sda, it is difficult to handle this in the test, can we modify the image to check if disk type is ssd or not?
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.
lsblk -l -n | grep 'disk'
will list all valid disks in the host
@@ -317,6 +317,9 @@ def test_show_platform_ssdhealth(duthosts, enum_supervisor_dut_hostname): | |||
|
|||
logging.info("Verifying output of '{}' on ''{}'...".format(cmd, duthost.hostname)) | |||
ssdhealth_output_lines = duthost.command(cmd)["stdout_lines"] | |||
if 'not SSD' in ssdcheck_output_lines: |
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.
Do you mean if not 'SSD' in ssdcheck_output_lines:
?
@sujinmkang can you address comment |
Description of PR
Skip the "show platform ssdhealth" test for non-SSD platform
Summary:
Fixes # (issue)
sonic-net/sonic-buildimage#9407
Type of change
Back port request
Approach
What is the motivation for this PR?
With recent ssd platform api changes, ssdhealth check fails on some specific platform.
Since the platform doesn't have SSD.
How did you do it?
Skip the show platform ssdhealth for any platform with other type of disk.
How did you verify/test it?
Run pytest tests/platform_tests/cli/test_show_platform.py
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation