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

Skip the "show platform ssdhealth" test for non-SSD platform #4807

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sujinmkang
Copy link
Contributor

Description of PR

Skip the "show platform ssdhealth" test for non-SSD platform

Summary:
Fixes # (issue)
sonic-net/sonic-buildimage#9407

Type of change

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

Back port request

  • 201911

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

neethajohn
neethajohn previously approved these changes Dec 3, 2021
@@ -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"
Copy link
Contributor

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?

Copy link
Contributor

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:
Copy link
Collaborator

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:?

@prgeor prgeor self-assigned this Jan 30, 2022
@prgeor
Copy link
Contributor

prgeor commented Jan 30, 2022

@sujinmkang can you address comment

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.

5 participants