Skip to content

Commit

Permalink
tests: fix 07autodetect
Browse files Browse the repository at this point in the history
Change graceful exit to skip to indicate the test cannot be run.
Add some sleep after creation, let's see if that's enough.

Signed-off-by: Mateusz Kusiak <[email protected]>
  • Loading branch information
dancesWithMachines committed Dec 6, 2024
1 parent 8077807 commit 44a67bf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/07autodetect
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
# put a partition on each, create an array, and see if we can
# use autodetect to restart the array.

if lsmod | grep md_mod > /dev/null 2>&1
then
echo md is a module - cannot test autodetect
exit 0
fi

[if lsmod | grep md_mod > /dev/null 2>&1] || skip "md is a module - cannot test autodetect"

mdadm -CR -e 0 $mdp0 -l0 -f -n1 $dev0
mdadm -CR -e 0 $mdp1 -l0 -f -n1 $dev1
Expand All @@ -23,6 +18,7 @@ sfdisk $mdp1 >&2 << END
END
udevadm settle
mdadm -CR -e 0 $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1
sleep 1
check resync
check raid1
check wait
Expand Down

0 comments on commit 44a67bf

Please sign in to comment.