1
0
Fork 0

Merging upstream version 2.12.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-20 08:10:44 +01:00
parent 078c0dbcc0
commit 635faa7346
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
571 changed files with 10718 additions and 2738 deletions

View file

@ -13,7 +13,7 @@ NVMe Verify Testcase:-
"""
from nvme_test import TestNVMe
from nvme_test import TestNVMe, to_decimal
class TestNVMeVerify(TestNVMe):
@ -25,9 +25,21 @@ class TestNVMeVerify(TestNVMe):
- test_log_dir : directory for logs, temp files.
"""
def verify_cmd_supported(self):
""" Wrapper for extracting optional NVM 'verify' command support
- Args:
- None
- Returns:
- True if 'verify' is supported, otherwise False
"""
return to_decimal(self.get_id_ctrl_field_value("oncs")) & (1 << 7)
def setUp(self):
""" Pre Section for TestNVMeVerify """
super().setUp()
if not self.verify_cmd_supported():
self.skipTest(
"because: Optional NVM Command 'Verify' (NVMVFYS) not supported")
self.start_block = 0
self.block_count = 0
self.namespace = 1
@ -44,10 +56,10 @@ class TestNVMeVerify(TestNVMe):
- Returns:
- return code for nvme verify command.
"""
verify_cmd = "nvme verify " + self.ctrl + \
" --namespace-id=" + str(self.namespace) + \
" --start-block=" + str(self.start_block) + \
" --block-count=" + str(self.block_count)
verify_cmd = f"{self.nvme_bin} verify {self.ctrl} " + \
f"--namespace-id={str(self.namespace)} " + \
f"--start-block={str(self.start_block)} " + \
f"--block-count={str(self.block_count)}"
return self.exec_cmd(verify_cmd)
def test_verify(self):