Skip to content

Commit 9a9f4d3

Browse files
committed
tests: skip write-uncor test when not supported
Make the write uncorrected test aware that this feature is not always supported. Signed-off-by: Daniel Wagner <wagi@kernel.org>
1 parent 901d3a3 commit 9a9f4d3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/nvme_writeuncor_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
3131
"""
3232

33+
from nvme_test import to_decimal
3334
from nvme_test_io import TestNVMeIO
3435

3536

@@ -51,6 +52,9 @@ def setUp(self):
5152
self.read_file = self.test_log_dir + "/" + self.read_file
5253
self.create_data_file(self.write_file, self.data_size, "15")
5354
open(self.read_file, 'a').close()
55+
oncs = to_decimal(self.get_id_ctrl_field_value("oncs"))
56+
if not oncs & (1 << 1):
57+
self.skipTest("write-uncor is not supported by this controller")
5458

5559
def tearDown(self):
5660
""" Post Section for TestNVMeUncor """

0 commit comments

Comments
 (0)