Skip to content

Commit 611bfc7

Browse files
committed
tests: Add a separate simpler MD activation test case
MD (de)activation is currently very race-y in both RHEL 9 and 10 and then tests fails often especially when starting and stopping the array multiple times. This introduces a new simple test case that should cover most of the use cases without failing all the time keeping the "full" test case, but marking it as unstable until these issues are resolved in mdadm.
1 parent a6c09ea commit 611bfc7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/mdraid_test.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,25 @@ def test_create_with_chunk_size(self):
202202

203203
class MDTestActivateDeactivate(MDTestCase):
204204
@tag_test(TestTags.SLOW, TestTags.CORE)
205+
def test_activate_deactivate_core(self):
206+
"""Verify that it is possible to activate and deactivate an MD RAID"""
207+
208+
succ = BlockDev.md_create("bd_test_md", "raid0",
209+
[self.loop_devs[0], self.loop_devs[1]],
210+
0, None, None)
211+
self.assertTrue(succ)
212+
213+
succ = BlockDev.md_deactivate("bd_test_md")
214+
self.assertTrue(succ)
215+
216+
succ = BlockDev.md_activate("bd_test_md",
217+
[self.loop_devs[0], self.loop_devs[1]], None)
218+
self.assertTrue(succ)
219+
220+
succ = BlockDev.md_deactivate("bd_test_md")
221+
self.assertTrue(succ)
222+
223+
@tag_test(TestTags.SLOW, TestTags.CORE, TestTags.UNSTABLE)
205224
def test_activate_deactivate(self):
206225
"""Verify that it is possible to activate and deactivate an MD RAID"""
207226

0 commit comments

Comments
 (0)