-
Notifications
You must be signed in to change notification settings - Fork 232
nvme basic test fix for disk count match #4437
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| # Copyright (c) Microsoft Corporation. | ||||||
| # Licensed under the MIT license. | ||||||
| import math | ||||||
| from typing import cast | ||||||
|
|
||||||
| from assertpy import assert_that | ||||||
|
|
||||||
|
|
@@ -16,7 +16,7 @@ | |||||
| from lisa.features import Nvme, NvmeSettings, Sriov | ||||||
| from lisa.search_space import IntRange | ||||||
| from lisa.sut_orchestrator.azure.platform_ import AzurePlatform | ||||||
| from lisa.tools import Cat, Df, Echo, Fdisk, Lscpu, Lspci, Mkfs, Mount, Nvmecli | ||||||
| from lisa.tools import Cat, Df, Echo, Fdisk, Lspci, Mkfs, Mount, Nvmecli | ||||||
| from lisa.tools.fdisk import FileSystem | ||||||
| from lisa.util.constants import DEVICE_TYPE_NVME, DEVICE_TYPE_SRIOV | ||||||
|
|
||||||
|
|
@@ -66,7 +66,7 @@ class NvmeTestSuite(TestSuite): | |||||
| and list nvme devices under /dev/. | ||||||
|
|
||||||
| 4. Azure platform only, nvme devices count should equal to | ||||||
| actual vCPU count / 8. | ||||||
| expected disk count from SKU capabilities. | ||||||
|
Comment on lines
68
to
+69
|
||||||
| """, | ||||||
| priority=1, | ||||||
| requirement=simple_requirement( | ||||||
|
|
@@ -414,13 +414,13 @@ def _verify_nvme_disk(self, environment: Environment, node: Node) -> None: | |||||
| ).is_length(len(nvme_device_from_lspci)) | ||||||
|
|
||||||
| # 4. Azure platform only, nvme devices count should equal to | ||||||
| # actual vCPU count / 8. | ||||||
| # expected disk count from SKU capabilities. | ||||||
|
Comment on lines
416
to
+417
|
||||||
| if isinstance(environment.platform, AzurePlatform): | ||||||
| lscpu_tool = node.tools[Lscpu] | ||||||
| thread_count = lscpu_tool.get_thread_count() | ||||||
| expected_count = math.ceil(thread_count / 8) | ||||||
| nvme_settings = cast(NvmeSettings, node.features[Nvme].get_settings()) | ||||||
| expected_count = nvme_settings.disk_count | ||||||
| assert_that(nvme_namespace).described_as( | ||||||
| "nvme devices count should be equal to [vCPU/8]." | ||||||
| f"nvme devices count should be equal to expected disk count" | ||||||
|
||||||
| f"nvme devices count should be equal to expected disk count" | |
| f"nvme namespace count should be equal to expected disk count" |
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.
The PR description content appears to be entirely inside an HTML comment in the PR template, so reviewers won’t see the rationale or the before/after behavior. Please add a visible description explaining what this PR changes and why.