Skip to content

Skip storage testcases if nvme cmd doesn't have 'NameSpace' in output.#3685

Merged
LiliDeng merged 1 commit intomainfrom
smyakam/nvme_dct_mariner/25_02_2025
Jul 28, 2025
Merged

Skip storage testcases if nvme cmd doesn't have 'NameSpace' in output.#3685
LiliDeng merged 1 commit intomainfrom
smyakam/nvme_dct_mariner/25_02_2025

Conversation

@SRIKKANTH
Copy link
Collaborator

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.

@SRIKKANTH SRIKKANTH force-pushed the smyakam/nvme_dct_mariner/25_02_2025 branch from 846c6d5 to 1510491 Compare July 6, 2025 19:06
@squirrelsc
Copy link
Member

@LiliDeng LGTM

@SRIKKANTH
Copy link
Collaborator Author

@LiliDeng please accept this PR.

@LiliDeng LiliDeng requested a review from Copilot July 28, 2025 05:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(

@SRIKKANTH SRIKKANTH force-pushed the smyakam/nvme_dct_mariner/25_02_2025 branch from 2c73425 to 68872a0 Compare July 28, 2025 06:45
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>
@SRIKKANTH SRIKKANTH force-pushed the smyakam/nvme_dct_mariner/25_02_2025 branch from 68872a0 to b9577a9 Compare July 28, 2025 06:45
@LiliDeng LiliDeng merged commit 38fce56 into main Jul 28, 2025
53 checks passed
@LiliDeng LiliDeng deleted the smyakam/nvme_dct_mariner/25_02_2025 branch July 28, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants