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 storage testcases if nvme cmd doesn't have 'NameSpace' in output. #3685

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update nvmecli.py
  • Loading branch information
SRIKKANTH committed Feb 28, 2025
commit 846c6d5b74be76bd38bf64ab5312c01d6e349cb8
2 changes: 2 additions & 0 deletions lisa/tools/nvmecli.py
Original file line number Diff line number Diff line change
@@ -108,13 +108,15 @@ def get_namespaces(self, force_run: bool = False) -> List[str]:
return namespaces_cli

def get_devices(self, force_run: bool = False) -> Any:
# get nvme devices information ignoring stderror
nvme_list = self.run(
"list -o json 2>/dev/null",
shell=True,
sudo=True,
force_run=force_run,
no_error_log=True,
)
# NVMe list command returns empty string when no NVMe devices are found.
if not nvme_list.stdout:
raise LisaException(
"No NVMe devices found. "
Loading
Oops, something went wrong.