Adding upstream version 2.12.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
65508f0a28
commit
c0fbec1eb4
571 changed files with 10718 additions and 2738 deletions
|
@ -29,8 +29,6 @@ NVMe Namespace Management Testcase:-
|
|||
5. Delete all Namespaces.
|
||||
"""
|
||||
|
||||
import time
|
||||
|
||||
from nvme_test import TestNVMe
|
||||
|
||||
|
||||
|
@ -52,8 +50,9 @@ class TestNVMeCreateMaxNS(TestNVMe):
|
|||
super().setUp()
|
||||
self.dps = 0
|
||||
self.flbas = 0
|
||||
(ds, ms) = self.get_lba_format_size()
|
||||
self.nsze = int(self.get_ncap() /
|
||||
self.get_format() / self.get_max_ns())
|
||||
(ds + ms) / self.get_max_ns())
|
||||
# Make sure that we have enough capacity for each ns.
|
||||
# Creating a ns might allocate more bits (NVMCAP) than specified by
|
||||
# nsze and ncap.
|
||||
|
@ -63,7 +62,6 @@ class TestNVMeCreateMaxNS(TestNVMe):
|
|||
self.max_ns = self.get_max_ns()
|
||||
self.ctrl_id = self.get_ctrl_id()
|
||||
self.delete_all_ns()
|
||||
time.sleep(1)
|
||||
|
||||
def tearDown(self):
|
||||
"""
|
||||
|
@ -85,21 +83,21 @@ class TestNVMeCreateMaxNS(TestNVMe):
|
|||
""" Testcase main """
|
||||
print(f"##### Testing max_ns: {self.max_ns}")
|
||||
for nsid in range(1, self.max_ns + 1):
|
||||
print("##### Creating " + str(nsid))
|
||||
print(f"##### Creating {nsid}")
|
||||
err = self.create_and_validate_ns(nsid,
|
||||
self.nsze,
|
||||
self.ncap,
|
||||
self.flbas,
|
||||
self.dps)
|
||||
self.assertEqual(err, 0)
|
||||
print("##### Attaching " + str(nsid))
|
||||
print(f"##### Attaching {nsid}")
|
||||
self.assertEqual(self.attach_ns(self.ctrl_id, nsid), 0)
|
||||
print("##### Running IOs in " + str(nsid))
|
||||
print(f"##### Running IOs in {nsid}")
|
||||
self.run_ns_io(nsid, 9, 1)
|
||||
|
||||
for nsid in range(1, self.max_ns + 1):
|
||||
print("##### Detaching " + str(nsid))
|
||||
print(f"##### Detaching {nsid}")
|
||||
self.assertEqual(self.detach_ns(self.ctrl_id, nsid), 0)
|
||||
print("#### Deleting " + str(nsid))
|
||||
print(f"#### Deleting {nsid}")
|
||||
self.assertEqual(self.delete_and_validate_ns(nsid), 0)
|
||||
self.nvme_reset_ctrl()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue