Skip storage testcases if nvme cmd doesn't have 'NameSpace' in output.#3685
Merged
Skip storage testcases if nvme cmd doesn't have 'NameSpace' in output.#3685
Conversation
squirrelsc
reviewed
Feb 28, 2025
846c6d5 to
1510491
Compare
Member
|
@LiliDeng LGTM |
Collaborator
Author
|
@LiliDeng please accept this PR. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves backward compatibility with older versions of nvme-cli by handling the missing 'NameSpace' field in the output. Instead of failing, storage test cases will now skip gracefully when this field is unavailable.
- Added detection for missing 'NameSpace' field in nvme-cli output
- Improved error handling with informative exception messages
- Enhanced nvme list command execution with stderr redirection
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lisa/tools/nvmecli.py | Added NameSpace field validation, improved error handling, and enhanced nvme list command execution |
| lisa/sut_orchestrator/azure/features.py | Updated method call to pass logger parameter for the new validation logic |
Comments suppressed due to low confidence (1)
lisa/tools/nvmecli.py:176
- The new error handling logic for missing 'NameSpace' field in older nvme-cli versions requires test coverage to ensure the exception is properly raised and handled.
def get_namespace_ids(
2c73425 to
68872a0
Compare
Older versions of nvme-cli do not have the NameSpace key in the output skip the test if NameSpace key is not available instead of failing. Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
68872a0 to
b9577a9
Compare
LiliDeng
approved these changes
Jul 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Older versions of nvme-cli do not have the 'NameSpace' field in the output.
This change will make the storage testcases to skip if NameSpace field is not available instead of failing.