Skip to content

Commit 4a990c0

Browse files
committed
tests: skip tests which rely on namespace management
These tests will fail if the controller does not support namespace management, thus skip them. Signed-off-by: Daniel Wagner <[email protected]>
1 parent a646e77 commit 4a990c0

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

tests/nvme_attach_detach_ns_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class TestNVMeAttachDetachNSCmd(TestNVMe):
4848
def setUp(self):
4949
""" Pre Section for TestNVMeAttachDetachNSCmd """
5050
super().setUp()
51+
52+
if not self.ns_mgmt_supported:
53+
self.skipTest("Namespace Management / Attach not supported by controller")
54+
5155
self.dps = 0
5256
self.flbas = 0
5357
(ds, ms) = self.get_lba_format_size()

tests/nvme_create_max_ns_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class TestNVMeCreateMaxNS(TestNVMe):
4848
def setUp(self):
4949
""" Pre Section for TestNVMeAttachDetachNSCmd """
5050
super().setUp()
51+
52+
if not self.ns_mgmt_supported:
53+
self.skipTest("Namespace Management / Attach not supported by controller")
54+
5155
self.dps = 0
5256
self.flbas = 0
5357
(ds, ms) = self.get_lba_format_size()

tests/nvme_format_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ class TestNVMeFormatCmd(TestNVMe):
6262
def setUp(self):
6363
""" Pre Section for TestNVMeFormatCmd """
6464
super().setUp()
65+
66+
if not self.ns_mgmt_supported:
67+
self.skipTest("Namespace Management / Attach not supported by controller")
68+
6569
self.dps = 0
6670
self.flbas = 0
6771
# Assuming run_ns_io with 4KiB * 10 writes.

0 commit comments

Comments
 (0)