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

@ -30,6 +30,7 @@ NVMe Compare Command Testcase:-
"""
from nvme_test import to_decimal
from nvme_test_io import TestNVMeIO
@ -52,7 +53,7 @@ class TestNVMeCompareCmd(TestNVMeIO):
- Returns:
- True if 'compare' is supported, otherwise False
"""
return int(self.get_id_ctrl_field_value("oncs"), 16) & (1 << 0)
return to_decimal(self.get_id_ctrl_field_value("oncs")) & (1 << 0)
def setUp(self):
""" Pre Section for TestNVMeCompareCmd """
@ -78,10 +79,10 @@ class TestNVMeCompareCmd(TestNVMeIO):
- Returns:
- return code of the nvme compare command.
"""
compare_cmd = "nvme compare " + self.ns1 + " --start-block=" + \
str(self.start_block) + " --block-count=" + \
str(self.block_count) + " --data-size=" + \
str(self.data_size) + " --data=" + cmp_file
compare_cmd = f"{self.nvme_bin} compare {self.ns1} " + \
f"--start-block={str(self.start_block)} " + \
f"--block-count={str(self.block_count)} " + \
f"--data-size={str(self.data_size)} --data={cmp_file}"
return self.exec_cmd(compare_cmd)
def test_nvme_compare(self):