Skip to content

Commit 80796ea

Browse files
MaisenbacherDigaw
authored andcommitted
tests: use current LBA format as I/O block size
When running I/O use the current LBA format as default block size. Signed-off-by: Dennis Maisenbacher <[email protected]>
1 parent 6e6305e commit 80796ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/nvme_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def setUp(self):
6161
self.nvme_bin = "nvme"
6262
self.do_validate_pci_device = True
6363
self.default_nsid = 0x1
64+
self.flbas = 0
6465
self.config_file = 'tests/config.json'
6566

6667
self.load_config()
@@ -521,7 +522,8 @@ def run_ns_io(self, nsid, lbads, count=10):
521522
- Returns:
522523
- None
523524
"""
524-
block_size = mmap.PAGESIZE if int(lbads) < 9 else 2 ** int(lbads)
525+
(ds, _) = self.get_lba_format_size()
526+
block_size = ds if int(lbads) < 9 else 2 ** int(lbads)
525527
ns_path = self.ctrl + "n" + str(nsid)
526528
io_cmd = "dd if=" + ns_path + " of=/dev/null" + " bs=" + \
527529
str(block_size) + " count=" + str(count) + " > /dev/null 2>&1"

0 commit comments

Comments
 (0)