-
Notifications
You must be signed in to change notification settings - Fork 179
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
NVMe and resource disc testcase fixes #3432
base: main
Are you sure you want to change the base?
Conversation
c7e4a17
to
bd7d0e2
Compare
f76263a
to
5855bb7
Compare
b402609
to
b29f14e
Compare
f"'WARNING: THIS IS A TEMPORARY DISK' should be present in {file_path}", | ||
).contains("WARNING: THIS IS A TEMPORARY DISK") | ||
node_disc = node.features[Disk] | ||
resource_disks = node_disc.get_resource_disks() |
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.
Add a method in Disk
feature, called like get_disk_controller_type
, and it accept mount point as a parameter. Please also reduce duplicate code with existing get_os_disk_controller_type
.
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.
Fixed it.
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.
Please refine get_os_disk_controller_type
to use the same logic. You can see the get_os_disk_controller_type
contains logic for FreeBSD too. If you implement another get_resource_disk_type
. The FreeBSD needs to fix the new failure again.
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.
Added new method "get_disc_type" to re-use in both get_os_disk_controller_type and get_resource_disk_type
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.
Please use disk
instead of disc
to keep consistent.
resource_disks = node_disc.get_resource_disks() | ||
if not resource_disks: | ||
raise LisaException("Resource disk not found") | ||
if "nvme" in resource_disks[0]: |
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.
As above comments, use the type enum, instead of checking by string.
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.
Introduced new constants for NVMe and SCSI resource disc types.
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.
New constants are right, but enum is needed too.
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.
Fixed as suggested
NVMe and resource disc testcase fixes 1. Added new testcase "Nvme.verify_nvme_function_unpartitioned". 2. NVMe test case fixes for disc controller type NVMe. 3. Resource disc testcases fixes for VMs with Local NVMEs. 4. "Nvme.verify_nvme_fstrim" - use fstrim testfile size based on available space.
cda3e20
to
0756836
Compare
lisa/features/disks.py
Outdated
return [] | ||
|
||
def get_resource_disk_type(self) -> str: | ||
return "" |
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.
It should be RESOURCE_DISK_TYPE_SCSI by default. The empty string is confusing. Actually, an enumeration is better to prevent misuse of a type.
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.
Fixed
NVMe and resource disc testcase fixes