diff --git a/test/mdraid.config b/test/mdraid.config index 5965ef2..3b8291a 100644 --- a/test/mdraid.config +++ b/test/mdraid.config @@ -1,9 +1,16 @@ -image test.mdraid { +image test.mdraid-a { mdraid { level = 1 + devices = 2 timestamp = 638022222 raid-uuid = "de9980f1-0449-4e83-84bd-98e4b1ca3fe3" disk-uuid = "eb3b107b-ae9d-4c6b-994a-ec412d36959b" } size = 5M } + +image test.mdraid-b { + mdraid { + inherit = "test.mdraid-a" + } +} diff --git a/test/misc.test b/test/misc.test index d930ac2..d6fc9e8 100755 --- a/test/misc.test +++ b/test/misc.test @@ -106,12 +106,16 @@ test_expect_success fiptool "fip" " exec_test_set_prereq mdadm test_expect_success mdadm "mdraid" " - run_genimage_root mdraid.config test.mdraid && - LANG=C mdadm --examine images/test.mdraid | tee images/test.mdraid.txt && - grep 'Checksum.*correct$' images/test.mdraid.txt && - grep 'State.*active$' images/test.mdraid.txt && - grep 'Internal Bitmap.*sectors' images/test.mdraid.txt && - grep 'Bad Block Log.*entries available' images/test.mdraid.txt + run_genimage_root mdraid.config test.mdraid-a && + LANG=C mdadm --examine images/test.mdraid-a | tee images/test.mdraid-a.txt && + LANG=C mdadm --examine images/test.mdraid-b | tee images/test.mdraid-b.txt && + grep 'Checksum.*correct$' images/test.mdraid-a.txt && + grep 'State.*active$' images/test.mdraid-a.txt && + grep 'Internal Bitmap.*sectors' images/test.mdraid-a.txt && + grep 'Bad Block Log.*entries available' images/test.mdraid-a.txt && + grep -Ev '(Device UUID|Checksum|Device Role) :' images/test.mdraid-a.txt | tail -n +2 > images/test.mdraid-a.arr.txt && + grep -Ev '(Device UUID|Checksum|Device Role) :' images/test.mdraid-b.txt | tail -n +2 > images/test.mdraid-b.arr.txt && + diff images/test.mdraid-a.arr.txt images/test.mdraid-b.arr.txt " test_done