As we open and close so quickly, udev might still have the device
open. so call udevsettle before stopping an array during testing.
Signed-off-by: NeilBrown <neilb@suse.de>
# mdadm always adds --quiet, and we want to see any unexpected messages
mdadm() {
rm -f $targetdir/stderr
# mdadm always adds --quiet, and we want to see any unexpected messages
mdadm() {
rm -f $targetdir/stderr
+ case $* in
+ *-S* ) udevsettle;;
+ esac
case $* in
*-C* ) $mdadm 2> $targetdir/stderr --quiet "$@" --auto=yes;;
* ) $mdadm 2> $targetdir/stderr --quiet "$@"
case $* in
*-C* ) $mdadm 2> $targetdir/stderr --quiet "$@" --auto=yes;;
* ) $mdadm 2> $targetdir/stderr --quiet "$@"