[Buildroot] [PATCH 1/1] support/testing: add mdadm runtime test

Peter Korsgaard peter at korsgaard.com
Tue Feb 6 21:06:52 UTC 2024


>>>>> "Julien" == Julien Olivain <ju.o at free.fr> writes:

 > Signed-off-by: Julien Olivain <ju.o at free.fr>
 > ---
 >  DEVELOPERS                                    |   2 +
 >  support/testing/tests/package/test_mdadm.py   | 138 ++++++++++++++++++
 >  .../package/test_mdadm/linux-mdadm.fragment   |   3 +
 >  3 files changed, 143 insertions(+)
 >  create mode 100644 support/testing/tests/package/test_mdadm.py
 >  create mode 100644 support/testing/tests/package/test_mdadm/linux-mdadm.fragment

..

 > +
 > +        # We add back this blank drive to the array.
 > +        self.assertRunOk(f"mdadm {md_dev} --add {failing_dev}")
 > +
 > +        # We wait few seconds to let the device rebuild.
 > +        time.sleep(3)
 > +
 > +        # The array should no longer be marked as degraded.
 > +        out, ret = self.emulator.run(monitor_cmd)
 > +        self.assertEqual(ret, 0)
 > +        self.assertNotIn("DegradedArray", "\n".join(out))


That hard coded 3s is likely to cause problems on gitlab as the runners
can be quite slow. How about reworking this to to check every few
seconds for up to E.G. 30s if it has gotten out of the DegradedArray
state?

That can be done later though - So committed, thanks.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list